Hi Sam, You are actually really close to the solution. To get the given and family names, you can use the following code:
# Given name userobj.name.given_name # Family name userobj.name.family_name If you are interested in the details, please look at the file gdata/ apps/__init__.py or browse the source code here: http://code.google.com/p/gdata-python-client/source/browse/trunk/src/gdata/apps/__init__.py Thanks, --Tony On Sep 11, 6:53 pm, Met Sacramento <[EMAIL PROTECTED]> wrote: > Bump. > > Help, please? > > On Sep 10, 9:22 pm, Met Sacramento <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I'm new to python, so please excuse my noobish questions. I've > > successfully retrieved a UserFeed for my currently logged in user (on > > Google App Engine), using the code below: > > > <b>service = > > gdata.apps.service.AppsService(email="[EMAIL PROTECTED]", > > domain="fakedomain.org", password="thisdoesnotwork") > > service.ProgrammaticLogin() > > userobj = service.RetrieveUser(users.get_current_user())</b> > > > Now, the goal of this piece of code is to retrieve the user's > > givenName and familyName. I can successfully narrow it down to the > > name tag, using the following code: > > > <b>return HttpResponse('%s' % (userobj.name))</b> > > > This returns the following to the browser: > > > <b><ns0:name familyName="Doe" givenName="John" xmlns:ns0="http:// > > schemas.google.com/apps/2006" /></b> > > > Is there any way to further traverse the atom feed to return just the > > given or family name? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Apps APIs" 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-apps-apis?hl=en -~----------~----~----~----~------~----~------~--~---
