Forum Archive

Things3 URL schema

felix_42sol_eu

Hi,
any things3 users that have a working example for x-callback-url with x-success?


I am looking for a solution to capture the IDs that things3 shoul hand back via x-success.

my last url:
things:///add-project?title=42sol.spice:%20Support%20the%20project&tags=test%2ctest&to-dos=review%2042sol.spice:%20Support%20the%20project%0asay%20hello%20to%20felix%0aadd%20a%20issue%20(bug%20report%20or%20feature%20puppy)%0alook%20at%20the%20code&deadline=in%204%20weeks&x-success=pythonista3%3A%2F%2F_gears%2Fxcallbackurl%2Fshow%3Faction%3Drun%26args%3Dx-things-iddoes not work

mikael

@felix_42sol_eu, I am not a Things user, but:

  • Does the URL work ok without the x-success callback?
  • Have you experimented with including the auth-token?
  • Does control move back to Pythonista at all?
JonB

Also, do you have a script at
This iPad/_gears/xcallbackurl/show.py?

You should be able to run your callback url from safari and launch the script.

felix_42sol_eu

Thanks for the detailed questions.

My Answers
- Yes the callback works without the x-success
- Yes the callback returns control to pythonista if I put in right x-success call

Strange is the missing result parameter documented by cultured-code (the Things3 developers)
- Yes the show.py script is called and executed.
- No auth-token might be a good hint - not yet tried it - will do it

After reading the latest release notes from Pyhtonista I even found that ole implemented a nice GUI to generate the x-callback-urls

I fear that Things3 would return the data if I only put in pythonista:// in the success parameter > which would then result in not working in pythonista cause it needs the parameters as argv or args

JonB

Ahh, ok, so thing3 must be returning a url of the form

pythonista3://your/script&action=run&x-things-id=SOMEID

I.e it is not naming it's parameters with argv.

@lukaskollmer had a thread where he showed how to implement an callback url where he swizzled the app's handler when it is opened by url, to be able to get the full url, including all parameters not just those names argv.

https://forum.omz-software.com/topic/3011/share-code-implemented-x-callback-url

I haven't tried this... There were some modifications later in the thread by other folks as well.

felix_42sol_eu

Hi @JonB,
OK I stumbled upon that post with the script also. On my second and third read and tests in the lastest Pythonista Beta (iPadOS13 and Python 3.6) I did not get it to run.

Update:
Now it worked with the updated version of the post and my x-callback-url inside the script ...

pythonista3://_gears/xcallbackurl/show?action=run&x-things-id=9BD5B336-6AB0-49D9-B3F2-546B52D73375

From there it should be solved easily

THX Felix