Closed
Bug 845763
Opened 13 years ago
Closed 13 years ago
[Contacts] Define a connector to import contacts from Gmail
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect)
Tracking
(blocking-b2g:leo+, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix)
RESOLVED
FIXED
| blocking-b2g | leo+ |
People
(Reporter: arcturus, Assigned: arcturus)
References
Details
Attachments
(1 file)
Create a connector based on the new infrastructure to import contacts from different sources.
In this case we will need to map the data coming from Gmail to our contacts database.
| Assignee | ||
Updated•13 years ago
|
Updated•13 years ago
|
| Assignee | ||
Comment 1•13 years ago
|
||
Marking as leo? as this will be needed in v1.1
blocking-b2g: --- → leo?
| Assignee | ||
Comment 2•13 years ago
|
||
We will be using Google Contacts API V3:
https://developers.google.com/google-apps/contacts/v3
Also using OAuth 2.0 for authenticating.
The contacts structure for each entry in google contacts is defined here:
https://developers.google.com/google-apps/contacts/v3/#contact_entry
With additional info regading the name (given, family, middle ...):
https://developers.google.com/gdata/docs/2.0/elements#gdName
And address (postal, city, country ...):
https://developers.google.com/gdata/docs/2.0/elements#gdStructuredPostalAddress
| Assignee | ||
Comment 3•13 years ago
|
||
This is the response for a single contact (yes, it's in xml):
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gd="http://schemas.google.com/g/2005" gd:etag=""RXg9fDVSLit7I2A9WhBSGUsPQgU."">
<id>http://www.google.com/m8/feeds/contacts/mepartoconmigo%40gmail.com/base/2fc27a388c2bd974</id>
<updated>2013-02-27T11:45:14.664Z</updated>
<app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-27T11:45:14.664Z</app:edited>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact" />
<title>My Shiny Contact</title>
<content>This is a Note</content>
<link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/mepartoconmigo%40gmail.com/2fc27a388c2bd974" gd:etag=""LhMgGHAHWit7I2BuPF4FFCt_B0ZEGiYpXwg."" />
<link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/mepartoconmigo%40gmail.com/full/2fc27a388c2bd974" />
<link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/mepartoconmigo%40gmail.com/full/2fc27a388c2bd974" />
<gd:name>
<gd:fullName>My Shiny Contact</gd:fullName>
<gd:givenName>My</gd:givenName>
<gd:additionalName>Shiny</gd:additionalName>
<gd:familyName>Contact</gd:familyName>
</gd:name>
<gContact:birthday when="1990-01-01" />
<gd:organization rel="http://schemas.google.com/g/2005#other">
<gd:orgName>The Company</gd:orgName>
<gd:orgTitle>Title in Company</gd:orgTitle>
</gd:organization>
<gd:email rel="http://schemas.google.com/g/2005#home" address="juan@palomo.es" primary="true" />
<gd:email rel="http://schemas.google.com/g/2005#work" address="workemail@email.com" />
<gd:im address="instantmessaging" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#other" />
<gd:phoneNumber rel="http://schemas.google.com/g/2005#work">+1555111333444222</gd:phoneNumber>
<gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#home">
<gd:formattedAddress>This is the Street
The PO Box
The Nieghborhood, The City, The State The Zip
The Country</gd:formattedAddress>
<gd:street>This is the Street</gd:street>
<gd:neighborhood>The Nieghborhood</gd:neighborhood>
<gd:pobox>The PO Box</gd:pobox>
<gd:postcode>The Zip</gd:postcode>
<gd:city>The City</gd:city>
<gd:region>The State</gd:region>
<gd:country>The Country</gd:country>
</gd:structuredPostalAddress>
<gContact:website href="http://www.myurl.com" rel="profile" />
<gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/mepartoconmigo%40gmail.com/base/6" />
</entry>
From this data we will map to our contact object:
name -> title
honorificPrefix -> gd:name prefix (if present)
givenName -> gd:name givenName
additionalName -> gd:name additionalName
familyName -> gd:name familyName
honorificSuffix -> gd:name suffix (if present)
nickname -> cannot find a match
email -> gd:email address
photo -> link with an specific rel (like a namespace: rel='http://schemas.google.com/contacts/2008/rel#photo' )
url -> gContact:website
category -> there is a category field but with no much info
adr -> map with fields from gd:structuredPostalAddress
tel -> gd:phoneNumber
org -> gd:organization gd:orgName
jobTitle -> gd:organization gd:orgTitle
bday -> gContact:birthday
note -> content
impp -> perhaps gd:im
anniversary -> no found a match
sex -> couldn't found a match
genderIdentity -> couldn't found a match
Comment 5•13 years ago
|
||
Francisco, please re-assign as necessary.
Assignee: nobody → francisco.jordano
| Assignee | ||
Comment 7•13 years ago
|
||
Attachment #719767 -
Flags: review?(jmcf)
Comment 8•13 years ago
|
||
Comment on attachment 719767 [details]
Pointer to GitHub PR 8389
thanks. now next step is the link between FTE and the connector
Attachment #719767 -
Flags: review?(jmcf) → review+
| Assignee | ||
Comment 9•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 10•13 years ago
|
||
I was not able to uplift this bug to v1-train. If this bug has dependencies which are not marked in this bug, please comment on this bug. If this bug depends on patches that aren't approved for v1-train, we need to re-evaluate the approval. Otherwise, if this is just a merge conflict, you might be able to resolve it with:
git checkout v1-train
git cherry-pick -x -m1 ebc228c16b4f3e7c52399b0924f7a15c13e5b5bb
<RESOLVE MERGE CONFLICTS>
git commit
Updated•13 years ago
|
Flags: needinfo?(francisco.jordano)
| Assignee | ||
Comment 11•13 years ago
|
||
Hi John,
It has a dependencies with the bug 843505, so far I checked that one is not uplift.
Do you need anything else?
Cheers!
Flags: needinfo?(francisco.jordano)
Comment 12•13 years ago
|
||
(In reply to Francisco Jordano [:arcturus] from comment #11)
> Hi John,
>
> It has a dependencies with the bug 843505, so far I checked that one is not
> uplift.
>
> Do you need anything else?
>
> Cheers!
Francisco, that bug is now leo+, but it has its own merge conflicts.
Comment 13•13 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•