Need help getting UserEntry Attribute!!

49 views
Skip to first unread message

Beloit Manager

unread,
Jun 21, 2011, 4:51:14 PM6/21/11
to google-app...@googlegroups.com
I am using python to retrieve a userentries information. For some reason I can obtain some parts but not others. I can obtain the entry.category but not the entry.category.scheme

More importantly I want to be able to grab a userEntries agreedToTerms attribute and return it.

    userEntry = gc.service.RetrieveUser(username)
    print userEntry.login
    print userEntry.login.admin
    print userEntry.login.suspended
    print userEntry.login. agreedToTerms





<?xml version='1.0' encoding='UTF-8'?>
<ns0:login admin="false" agreedToTerms="true" changePasswordAtNextLogin="false" ipWhitelisted="false" suspended="false" userName="username" xmlns:ns0="http://schemas.google.com/apps/2006" />
false
false
Traceback (most recent call last):
  File "example.fail", line 14, in ?
    print userEntry.login. agreedToTerms
AttributeError: 'Login' object has no attribute 'agreedToTerms'



What am I doing wrong?

-DN

Chet

unread,
Jun 21, 2011, 4:59:15 PM6/21/11
to Google Apps Domain Information and Management APIs
userEntry.login.agreed_to_terms

BeloitProgrammer

unread,
Jun 24, 2011, 4:01:18 PM6/24/11
to google-app...@googlegroups.com
Thanks Chet.

is there some kind of list of ways to actually access these attributes? I am having trouble accessing the changePasswordAtNextLogin attribute. is there a list of syntax to get attributes somewhere?

Chet

unread,
Jun 26, 2011, 11:44:56 AM6/26/11
to google-app...@googlegroups.com
userEntry.login.change_password = 'true'

Unfortunately, the doc for the APIs is spotty.  The source code is your best bet, for the Google Apps Provisioning API for python:  

BeloitProgrammer

unread,
Jun 30, 2011, 2:14:27 PM6/30/11
to google-app...@googlegroups.com
Hadn't even thought about that. Great idea.

Thanks Chet,

DN
Reply all
Reply to author
Forward
0 new messages