TweetSampler is a tiny .NET Core application that
- Consumes Twitter V2 Sample Stream API, which provides approximately 1% of the full tweet stream.
- Provides trending hashtags in real time.
TweetSampler.Worker is a worker service that does nothing but hosting the processor which does all the hard work.
TweetSampler.Core is a class library that calls Tweetinvi to access Twitter STREAM APIs. It receives Sample Tweet Stream and finds out the Top 10 most popular Hashtags. It also persist the results for the pourpose of sharing to the public.
TweetSampler.Model is also a class library that contains common models shared betwen TweetSampler.Core and TweetSampler.API.
TweetSampler.API is REST API that publishes the most popular Hashtags to the public.
Assuming you've already set up your own Twetter project and application, you'll need to provide Twitter Bearer Token in appsettings.json before you can run the worker service.
"TweetSamplerConfiguration": { "TwitterBearToken": "REPLACE THIS" }
Run the worker service for at least a few minutes. You'll see Data\TrendingHashTags.json periodically updated with the lastest top hashtags.
http://localhost:5145/TrendingHashTags