Is there a way to list all Tags of /users/me/

27 views
Skip to first unread message

Martin

unread,
Sep 11, 2013, 4:23:54 PM9/11/13
to spring...@googlegroups.com
I would like to create a list of all the tags that I am using. Is there a straight forward way to do that?
If yes, is it possible to filter the list i.e. show only tags that are used in a specific notebook..

Thanks, Martin

Martin

unread,
Sep 11, 2013, 5:20:09 PM9/11/13
to spring...@googlegroups.com
Found out the first part of my question by more carefully reading the API documentation:

Unfortunately, filters are ignored so 

still returns all of my tags.

Chuck Garofalo

unread,
Sep 12, 2013, 8:32:28 AM9/12/13
to spring...@googlegroups.com
Hi Martin,

You are correct, that api will give you what you are looking for.  The filter, however, should work and I tried it on my own notebook and got the expected result.  Either the notebook name (be careful to url encode spaces) or the uuid will work with the "workbook" parameter.  

So, can you give it another try with a substitute name or uuid?  If you are still having trouble can you give me the exact url you are using and the http response you are getting?

Regards,
Chuck

Martin

unread,
Sep 12, 2013, 1:00:42 PM9/12/13
to spring...@googlegroups.com
Hi Chuck,

Thanks for the quick reply. You are right, the Sprinpad API rocks and actually works with the filtering! The bug was in the Python example code that is part of the API documentation and which I adapted to explore the API. It the example the service parameters are part of the http_url. Actually, (my version of) Python ignores the '?' and everything following; the parameters have to be passed with the keyword parameters and Python takes care of the correct encoding.  The code below works:

request = oauth.OAuthRequest.from_consumer_and_token(consumer, token=access_token,

      http_url="http://springpad.com/api/users/me/blocks"

      http_method='GET',

      parameters={'workbook' : 'xyz'})

request.sign_request(signature_method, consumer, access_token)

url = request.to_url()

response, data = httplib2.Http().request(url)


I guess it would be helpful to update the code snippet in the documentation. For me it would also be very helpful if there was a list of some interesting query examples right below the authentication code snippets to give some ideas of what is possible with the API. e.g.:

http://springpad.com/api/users/me/ # Some general user information and references to e.g. the system data block

http://springpad.com/api/users/me/blocks/{Systemdatta block UUID} # Systemdata block contains among other information a list of the users workbooks

http://springpad.com/api/users/me/blocks/count/tag # list all tags with counts

http://springpad.com/api/users/me/blocks/count/*?workbook=xyz # counts everything countable in workbook with UUID xyz.
...
... 
 

Thanks,
Martin 
Reply all
Reply to author
Forward
0 new messages