I am abit new with using APIs in python.Has anyone worked with the Marvel API? This is the code that I am using when making a call to search for a comic creator. class ActionSearchCreator(Action): def name(self): # name of the action to be included in the training stories return “action_search_creator”
def run(self,tracker,dispatcher,domain):
## action to be taken
query = "/v1/public/creators?"
query_url = base_url + query +"ts=" + ts+ "&apikey=" + api_key + "&hash=" + hasht
request = requests.get(query_url).json()
creator = request['firstName' + 'lastName']
dispatcher.utter_message(creator) #send back to the user
return [creator]