def make_query_complex(self, words): """ Same function as make_query_simple but accepts a list """ url_frame1 = "http://api.urbandictionary.com/v0/define?term=" combo = "+".join(words) return sanitizeSpaceURL(url_frame1 + combo)
def make_query_complex(self, words): """ Same function as make_query_simple but accepts a list """ url_frame1 = 'http://version1.api.memegenerator.net/Generators_Search?q=' url_frame2 = '&pageIndex=0&pageSize=12' combo = "+".join(words) return sanitizeSpaceURL(url_frame1 + combo + url_frame2)
def make_query_simple(self, word): """ Make a query with a single word Type must be a string Will return an address used to search for the gifs that fit the word """ url_frame1 = "http://api.urbandictionary.com/v0/define?term=" return sanitizeSpaceURL(url_frame1 + word)
def make_query_complex(self, words): """ Same function as make_query_simple but accepts a list """ url_frame1 = "http://api.giphy.com/v1/gifs/search?q=" url_frame2 = "&limit=100&api_key=dc6zaTOxFJmzC" query_list = [] for x in words: query_list.append(sanitizeSpaceURL(url_frame1 + x + url_frame2)) return query_list
def make_query_simple(self, word): """ Make a query with a single word Type must be a string Will return an address used to search for the gifs that fit the word """ url_frame1 = "http://api.giphy.com/v1/gifs/search?q=" url_frame2 = "&limit=100&api_key=dc6zaTOxFJmzC" return sanitizeSpaceURL(url_frame1 + word + url_frame2)
def make_query_simple(self, word): """ Make a query with a single word Type must be a string Will return an address used to search for the gifs that fit the word """ url_frame1 = 'http://version1.api.memegenerator.net/Generators_Search?q=' url_frame2 = '&pageIndex=0&pageSize=12' return sanitizeSpaceURL(url_frame1 + word + url_frame2)
def make_query_final(self,word_list): url_frame1 = "http://api.giphy.com/v1/gifs/search?q=" url_frame2 = "&limit=100&api_key=dc6zaTOxFJmzC" combo = ','.join(word_list) return sanitizeSpaceURL(url_frame1 + combo + url_frame2)