0

I am trying to build an open-source python code hosted at GAE to sync contacts by group to a limited number of users. In a web interface users will be able to pick their group and whom it will be synced with.

I understand there is a lot of applications on market place withe the same functionality, but my organization is concerned about those provides selling contacts to 3rd parties. We are a non-profit organization, so the code could be hosted at google project or github for community contribution.

(sorry for the long intro)

  • How is the best way to start? is there tutorial available with similar functionality that I can expand?
  • What is the best way to compare two Contact kind elements? To see if they need to be sync.
  • Is there a last update on the Contact kind elements? In case I want to implement a last update wins?

thanks!

4

2 回答 2

1

我不知道任何专门用于同步和比较联系人的教程,但在https://developers.google.com/google-apps/contacts/v3/上有一个 Google Contacts API 的入门指南。

联系人作为 XML blob 发送,因此您可以通过解析两个联系人并查看其中的各个元素来比较两个联系人。我认为没有更好的方法可以做到这一点,但有图书馆可以为您处理。

使用 API 检索联系人时,会发送一个最后更新的字段作为联系人的一部分。它是一个标记为 的 XML 元素<updated>

于 2012-12-05T19:16:11.340 回答
0
how are you getting different user's contacts feeds?

i tried to save the tokens in the datastore when the
users grant the access, but when i get the token back
from datastore for 2 users at a time, after an hour
when the token expires, 
all tokens start working like the current users token
and i can only get current users contacts.

token = Get_Shared_User_Token(user_email)
contact_client = gdata.contacts.client.ContactsClient(source=USER_AGENT)
authorized_client = token.authorize(contact_client)

contacts_feed = authorized_client.GetContacts(q = query)

can you please tell how one can get any user's contacts?
于 2013-02-08T16:09:31.747 回答