Closed FreeMasen closed 6 years ago
Now that we have two API calls this needs to become a priority.
class Response():
'''The result of an outbound request'''
class Result():
'''A single entry in a response object'''
The reason this needs to become a priority is that we need to be able to gracefully handle the display of the data in the template. Now that we have a mixture of tweets and images, it is far more difficult to do this. I would be a good idea to unify the two api service calls into a singular request service.
def Requestor():
def search_tweets(self, term):
'''search for tweets on twitter'''
def search_giphy(self, term):
'''search for gifs on giphy'''
This would allow us to have one entry point for all searches. It also may be worth it to explore using a generic http request library and setting the correct headers for each of the services we add
Moved the twitterAPI.py & giphyAPI.py into one file called: api.py
Will finish the wiki api and add that to api.py tonight/tomorrow
Wiki Api is done! Lmk if you need api.py structured differently... I think it's how you wanted it
class Response():
class Tweet():