Custom action with Marvel API

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]

I never used Marvel API, does your query work?

One thing, though, you need to return a SlotSet event in the custom action, rather than a name directly. See our docs for details: Actions

I’m not sure, but I think, it rather should be

creator = request['firstName'] + " " + request['lastName']