PHP code example of cryptocontrol / crypto-news-api
1. Go to this page and download the library: Download cryptocontrol/crypto-news-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cryptocontrol / crypto-news-api example snippets
$api = new CryptoControl\CryptoNewsApi("API_KEY_HERE");
# Enable the sentiment datapoints
$api->enableSentiment();
# get top news
print_r($api->getTopNews());
# get latest russian news
print_r($api->getLatestNews("ru"));
# get top bitcoin news
print_r($api->getTopNewsByCoin("bitcoin"));
# get top EOS tweets
print_r($api->getTopTweetsByCoin("eos"));
# get top Ripple reddit posts
print_r($api->getLatestRedditPostsByCoin("ripple"));
# get reddit/tweets/articles in a single combined feed for NEO
print_r($api->getTopFeedByCoin("neo"));
# get latest reddit/tweets/articles (seperated) for Litecoin
print_r($api->getLatestItemsByCoin("litecoin"));
# get details (subreddits, twitter handles, description, links) for ethereum
print_r($api->getCoinDetails("ethereum"));