Hi,
I've been building an application that follows the feedfetcher
example pattern for asking permission from the user to access
particular feeds. In my case, I asked for access to spreadsheets and
contacts. My spreadsheets access has been fine and I've written quite
a bit of code reading from spreadsheets.
Now I'm turning my attention to creating contact lists from some of
the data in the spreadsheets. I can't figure out how to authenticate
my request by reusing a token.
When I call the following command:
tokens = gdata.alt.appengine.load_auth_tokens()
I know that it gives me two tokens for that user - and when I check
the scope in them by doing this:
spreadsheets = False;
contacts = False;
for token_scope in tokens:
variable = token_scope.split("/")
for v in variable:
if variable[2] == "spreadsheets.google.com":
spreadsheets = True;
elif variable[5] == "contacts":
contacts = True;
I can tell that I have a spreadsheet and a contacts token stored in
the TokenCollection. ( I'm still learning Python so the above code
could be a crude approach ).
So when I call a http request that does this:
client = gdata.contacts.service.ContactsService()
gdata.alt.appengine.run_on_appengine(client)
tokens = gdata.alt.appengine.load_auth_tokens()
HOW DO I SET THE AUTH TOKEN FOR CONTACTS ON THIS CLIENT?
???? client.current_token = ????
new_group = gdata.contacts.GroupEntry(title=atom.Title(text='my
best friends'))
group_entry = client.CreateGroup(new_group)
Please can you advise me how to make the right function calls to
associate my stored token with the contact service client?
Thanks in advance for your help.
Anton
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---