Git Product home page Git Product logo

newsapi's Introduction

About this Project

This is an unofficial backend for News, utilizing NewsApi for fetching news. This project was developed as part of a Web Development vocational training Project.

Note

  • There's a seperate branch for Node, which can be accessed here

Folder Structure

# root
├── src/
│   ├── Fetch.php
│   ├── Helper.php
│   ├── logger.php
│   └── NewsAPI.php
└── index.php

Prerequisites

  • You need to install git or download using the zip method.

  • This is solely written in PHP, so it makes it obvious to have PHP installed.

  • There are two ways of having it installed:

    1. The Easy way using Xampp
    2. Using the Hard way is the official way

Steps to Deploy

If you using the git method:

  • Clone this Repository by using HTTP (or) SSH method.
    Example using HTTP method:
    git clone --depth=1 https://github.com/davinash97/newsapi

  • An API is needed from NewsApi for every requests.

  • The API key is supposed to be placed here. (It is purposely done so)

If you chose the EASY way:

  • Paste the newsapi directory inside xampp directory
    (Typically it's C:/xampp in Windows)
  • Look for htdocs folder and paste the newsapi folder there.
  • Now start the server from xampp control panel.
  • Open http://localhost:80
    • Point to note is port address i.e., 80 (in our case) can vary

If you chose the HARD way:

  • Now do cd newsapi to change the current directory.
  • Do php -S localhost:5500 to deploy and open the localhost:5500 in your preferred browser.

Supported Endpoints

  • Top Headlines: Can Provide with parameters like Keyword, Country or Category. Can also be used altogether to get specific result.

  • Everything: Can provide results with parameters like Keyword, Language, or searchIn category

It is limited to these for now, might add more in future versions (it's a "maybe" situation)

Updates

  • Feel free to improve or add features. Contributions in anyway possible are always welcome.

newsapi's People

Contributors

davinash97 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.