Jump to content
ckueda

Make multiple api calls

Recommended Posts

I was wondering how I can make a second api call based on an id I receive when making a first api call. For example using the Movie Database API (https://www.themoviedb.org/documentation/api) I'd like to performa a search using the search endpoint (https://developers.themoviedb.org/3/search/search-movies) for a particular title. Then using the id I receive from the selecting a result from that search perform another api call to the image endpoint (https://developers.themoviedb.org/3/movies/get-movie-images) to get a list of all the movie posters available. 

 

I was able to get the id using this tutorial as a starter (https://www.deanishe.net/alfred-workflow/tutorial_1.html) and using the Script Filter, but I'm a little confused as to next steps. I set the wf.add_item() arg to the id then I figured I'd hook up the output of the script filter to a Run Script Action using another python file as an External Script but this doesn't seem to be working. Or can I connect it to another Script Filter? If there are any examples of something like this please let me know. 

 

Thanks 

Share this post


Link to post

Your Run Script idea should work just fine. Are you getting an error in Alfred’s debugger? If I had to guess, I’d say you maybe forgot to make the script executable?

 

You can connect a Script Filter to another Script Filter. Whether that’s appropriate depends on what you want to do with the covers.

 

If you’d like a definitive answer, please upload the workflow somewhere and post a link so we can have a look.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...