newsapi-php icon indicating copy to clipboard operation
newsapi-php copied to clipboard

A PHP client for the News API (https://newsapi.org/docs/get-started)

Results 8 newsapi-php issues
Sort by recently updated
recently updated
newest added

Deprecated: Creation of dynamic property jcobhams\NewsApi\NewsApi::$client is deprecated in /vendor/jcobhams/newsapi/src/NewsApi.php on line 18

Laravel 9 comes with guzzle 7 but this package require guzzle 6 Can we make this package working with newer versions of Laravel?

`$newsapi->getTopHeadlines($q, $sources, $country, $category, $page_size, $page);` According to this I have Used like this in my code ` $response = $newsapi->getTopHeadlines($country='us', $category='health');` But it is not working.

Fatal error: Uncaught jcobhams\NewsApi\NewsApiException: Invalid SortBy Identifier Provided in /myproject/vendor/jcobhams/newsapi/src/NewsApi.php:120 Stack trace: #0 You are using Helpers::isLanguageValid in NewsApi.php whereas you should be using Helpers::isSortByValid

When calling the function $this->getSources(), it threw an error about an undefined $payload variable.

When calling the function $this->getSources(), it threw an error about an undefined $payload variable.