Dear Vince,

Which kind of authentication I will use with this code?

Which command line should I use? Should I sent my domain and my admin
password as parameters?

Could you please help?

Thank you in advance!
--
Best Regards,

*Danilo Almeida Nogueira*
ICS/IT TEAM - CoE Collaboration Support Leader
Converteam Brasil LTDA
Phone: +55 31 3330-5883
GSD Phone: +55 31 9965-3450
[email protected]



On 5 May 2011 18:40, Vince Spicer <[email protected]> wrote:

>
>
> On Thu, May 5, 2011 at 3:13 PM, Danilo Nogueira <
> [email protected]> wrote:
>
>> Dear All,
>>
>> I need a API (in python) where I can remove all contacts from my
>> Google contacts directory (Gapps enterprise).
>>
>> Anyone have something to send me?
>>
>> Thank you very much!!!
>>
>> Best regards,
>>
>> Danilo Nogueira
>> ICS/IT Team
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Google Contacts, Shared Contacts and User Profiles 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://code.google.com/apis/contacts/community/forum.html
>
>
>
>
> This is rough script bit it does wipe all contacts and groups if passed in
> a gdata.contacts.client.ContactsClient
>
>     def wipe_google_account(Contacts):
>
>         print "Wiping ALL Contact data from %r account" % account
>
>         # lets clear out the google accounts with some batch deletes
>
>         # patch submitted to enable Contact groups querying
>         # groups =
> Contacts.get_groups(query=gdata.contacts.client.ContactGroupsQuery(max_results=9999))
>         while True:
>             groups = Contacts.get_groups()
>             non_system = [x for x in groups.entry if not x.system_group]
>             if not non_system:
>                 break
>             batch = gdata.contacts.data.GroupsFeed()
>             [batch.AddDelete(entry=x) for x in non_system]
>             Contacts.execute_batch(batch, groups.find_batch_link())
>             print "removed %s groups " % len(non_system)
>
>         while True:
>             # batch requests are limited to 100 operations
>             contacts =
> Contacts.get_contacts(query=gdata.contacts.client.ContactsQuery(max_results=100))
>             data = contacts.entry
>             if not data:
>                 break
>             batch = gdata.contacts.data.ContactsFeed()
>             [batch.AddDelete(entry=x) for x in data]
>             Contacts.execute_batch(batch, contacts.find_batch_link())
>             print "removed %s contacts" % len(data)
>
> Vince
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Google Contacts, Shared Contacts and User Profiles 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://code.google.com/apis/contacts/community/forum.html
>

CONFIDENTIALITY: This e-mail and any attachments are confidential and may be 
privileged.
If you are not a named recipient, please notify the sender immediately and do 
not disclose the contents to another person, use it for any purpose or store or 
copy the information in any medium.

Converteam Brasil Ltda. http://www.converteam.com

Please consider the environment before printing this email.

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles 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://code.google.com/apis/contacts/community/forum.html

Reply via email to