Jump to content

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 

Link to comment

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.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...