This commit builds the foundation for the twitter bot that Numainda was missing.
The Twitter class was renamed to TwitterBot and has the following methods:
A new authenticate function which authenticates users using the Twitter API.
post_tweet
get_mentions to get all the tweets tagging the bot so it can answer the user's questions
The implementation does not directly communicate with the API but rather uses a package called tweepy. The post_tweet and get_mentions methods have not been tested since it requires a different level of access. My API keys only support the Free Level Access.
Now the next step is to get the bot up and running. This would require the bot to concurrently run with the streamlit web server. Or maybe another approach would be to write a separate service for the bot that can run independently.
This commit builds the foundation for the twitter bot that Numainda was missing.
The
Twitter
class was renamed toTwitterBot
and has the following methods:authenticate
function which authenticates users using the Twitter API.post_tweet
get_mentions
to get all the tweets tagging the bot so it can answer the user's questionsThe implementation does not directly communicate with the API but rather uses a package called tweepy. The
post_tweet
andget_mentions
methods have not been tested since it requires a different level of access. My API keys only support the Free Level Access.Now the next step is to get the bot up and running. This would require the bot to concurrently run with the streamlit web server. Or maybe another approach would be to write a separate service for the bot that can run independently.