11
edits
| 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. To get a more specific property, use the "." operator. | * <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 as specified in the W3C contacts API. | ||
For example, a fields argument could be <tt>["displayName", "emails", "phoneNumbers", "name.givenName"]</tt>. | For example, a fields argument could be <tt>["displayName", "emails", "phoneNumbers", "name.givenName"]</tt>. | ||
| Line 31: | Line 31: | ||
} | } | ||
* <tt>options</tt> is an object that expresses | * <tt>options</tt> is an object that expresses the various options allowed in the W3C contacts API. The options allowed are "filter", "multiple", "limit", and "updatedSince". "filter" allows for filtering of contacts based on pattern matching. "multiple" allows for multiple contacts to be returned. "limit" specifies a limit of contacts to be returned. Finally, "updatedSince" specifies only contacts that have been updated after a certain time. More in-depth explanations of the options are detailed in the W3C contacts spec. | ||
For example, a | For example, a options of <tt>{ filter:"paul", multiple:true, limit:5, updatedSince:"2009-10-10T12:00:00-05:00" }</tt> will include only contacts where one of the fields requested contains the substring "paul" (case insensitive). | ||
== Contact Schema == | == Contact Schema == | ||
edits