library newscred
Class for NewsCred API
newscred/newscred
Class for NewsCred API
- Monday, March 17, 2014
- by mterenzio
- Repository
- 3 Watchers
- 0 Stars
- 3 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
newscred
Class for working with NewsCred API, (*1)
example usage to grab the links to articles from a search and put in an array:, (*2)
$newscred = new NewsCred('yourapikeyhere');
$options['query'] = 'Obama Debt Ceiling';
$results = json_decode($newscred->searchArticles($options));
$links = array();
foreach ($results->article_set as $article) {
array_push($links, $article->link);
}
echo print_r($links);