static RedditComments[] GetComments(string _token, string _ArtID) { var client = new RestClient("https://oauth.reddit.com/r/soccer/comments/" + _ArtID); var request = new RestRequest(Method.GET); request.AddHeader($"Authorization", "Bearer " + _token); request.AddParameter("undefined", "Sentiment Analysis/0.1 by Zycroft", ParameterType.RequestBody); IRestResponse response = client.Execute(request); RedditComments[] myReddit = RedditComments.FromJson(response.Content); return(myReddit); }
public void ShillReddit() { var cryptoCurrencyComments = RedditComments.GetComments("cryptocurrency", 1000); var cryptoMarketsComments = RedditComments.GetComments("cryptomarkets", 1000); var altcoinComments = RedditComments.GetComments("altcoin", 1000); var cryptoCurrencyTradingComments = RedditComments.GetComments("CryptoCurrencyTrading", 1000); cryptoCurrencyComments.AddRange(cryptoMarketsComments); cryptoCurrencyComments.AddRange(altcoinComments); cryptoCurrencyComments.AddRange(cryptoCurrencyTradingComments); ShillStatician statician = new ShillStatician(cryptoCurrencyComments); statician.PrintFrequencies(); }