Jump to content

ckueda

Member
  • Posts

    8
  • Joined

  • Last visited

Posts posted by ckueda

  1. 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 

  2.  

    The above thread seems to indicate that an empty {query} will always be sent to the external script. However I'm trying to use this timer script https://github.com/dbader/alfred-countdown-timer/blob/master/Timer/timer.py and I think the code says that if I pass in an empty query it should display a notification telling me how to use this script. However in testing I found that main() doesn't even run when the query is empty. Am I misunderstanding something either about this script or how alfred works? Thanks!

  3. Thanks for the help! I didn't know about the custom searches so that's good to know. 

     

    Regarding the option to send text from one workflow object to another I tried that but it didn't seem to work. I'll revisit it again to make sure I'm doing it right. In the end I googled up a bit of applescript and used that instead. No error handlers though haha. 

  4. Hi, 

     

    I'd like to open different URLs based on a query. For example I have various stg environments representing different countries. I'd like to be able to type "stg us" and have it open the us-stg.com but also type "stg uk" and have it open uk-stg.com.

     

    I had thought I could take the query and parse it in either php or python and have it return the value to the "Open URL" action but didn't know how to return the value to the "Open URL" action. 

     

    Any advice would be appreciated. 

     

    Thanks,

    Chris
     

×
×
  • Create New...