Jump to content

ckueda

Member
  • Posts

    8
  • Joined

  • Last visited

ckueda's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  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. Thanks for the reply! I guess the first step would be to edit the workflow so that it doesn't need the query? Currently it looks like it's set so the argument is optional which I took to mean that it doesn't need a query? See attached screenshot. Or is it in the Run Script action?
  3. 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!
  4. Thanks! I'll look into that as well. I'm a novice programmer so that might be a bit difficult for me but thanks for the help.
  5. 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.
  6. 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
  7. Thanks for the response! I was really looking for a recommendation on a way to store login and password info for use in a workflow. Right now I have it hardcoded in the script, which I imagine is the only way to do it at this point?
  8. Just wondering if there is a best practice regarding storing or setting user login information that might be used for other services?
×
×
  • Create New...