Labs/Contacts/ContentAPI: Difference between revisions

Jump to navigation Jump to search
Line 9: Line 9:
The arguments are interpreted as follows:
The arguments are interpreted as follows:


* <tt>fields</tt> is an array of strings that express which fields of the contact will be made available to the web page.  The strings should be drawn from the set of known properties described in "Contact Schema", below.  The user will be asked to confirm each of the fields, and may choose to deny access to some fields, in which case the web page will receive a subset of what was requested.
* <tt>fields</tt> is an array of strings that express which fields of the contact will be made available to the web page.  The strings should be drawn from the set of known properties described in "Contact Schema", below.  The user will be asked to confirm each of the fields, and may choose to deny access to some fields, in which case the web page will receive a subset of what was requested. To get a more specific property, use the "." operator.


For example, a fields argument could be <tt>["displayName", "emails", "phoneNumbers"]</tt>.
For example, a fields argument could be <tt>["displayName", "emails", "phoneNumbers", "name.givenName"]</tt>.


Also note the special field argument "idHash", which returns to MD5 hash of all the email addresses of the contact. (TODO: automatically salt the hash with the hostname?)
Also note the special field argument "idHash", which returns to MD5 hash of all the email addresses of the contact. (TODO: automatically salt the hash with the hostname?)
11

edits

Navigation menu