Skip to content

This library helper is helper API for News.org written with PHP to assist making API calls to News.org for retrieving news it uses custom filtering and sorting provided by the API Vendor

License

MatyilaGoodwish/News-API-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

News API Commercial PHP Library.

By Goodwish Support: 087 057-1581 https://www.goodwishmatyila.co.za

Installation

 
composer require newsorg/commercial

This package is not auto-updated. Please set up the GitHub Service Hook for Packagist so that it gets updated whenever you push!
News API Commercial PHP Library.

Requirements

cUrl Extensions

PHP >= 7.0

#Require the class

require_once 'News.php';

Include namespace

use News\Resources as Articles;

Extend base class

class Latest extends Articles{
	public function __construct(){
		parent::__construct();
	}
}

Usage, Get Everything

 $queryOptionsEverything = Array(
	"apiKey"=>"your-api-key", 
	"from" => "2008-03-02",
	"to"=>"2018-08-05",
	"query" => "news-south-africa",
	"language" => "en"
	);

Pass the options to setEverything with argument

 Latest::setEverything($queryOptionsEverything);
 

Usage, Get sources

 $queryOptionsSources = Array(
	"apiKey"=>"your-api-key", 
	"from" => "2008-03-02",
	"to"=>"2008-03-05",
	"query" => "soccer",
	"country" => "za",
	"language" => "en"
	);

Pass the options to setSources with argument

 Latest::setSources($queryOptionsSources);
 

Usage, Get Headlines

 $queryOptionsHeadlines = Array(
	"apiKey"=>"your-api-key", 
	"from" => "2008-03-02",
	"to"=>"2008-03-05",
	"query" => "soccer",
	"country" => "za",
	"language" => "en"
	);
 

Pass the options to setHeadlines with argument

 Latest::setHeadlines($queryOptionsHeadlines);
 

About

This library helper is helper API for News.org written with PHP to assist making API calls to News.org for retrieving news it uses custom filtering and sorting provided by the API Vendor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%