Labs/Contacts/ContentAPI: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 75: Line 75:


* <tt>updates(callback)</tt> invokes the callback repeatedly, passing an array of objects representing recent updates.  The properties of the update object are:
* <tt>updates(callback)</tt> invokes the callback repeatedly, passing an array of objects representing recent updates.  The properties of the update object are:
** <tt>text</tt>: always present; a short text message
** <tt>source</tt>: always present; the name of the service that provided the update
** <tt>sourceLink</tt>: always present; a link to the page of the service that provided the update
** <tt>link</tt>: optional; a link to more detail for the update


  * <tt>text</tt>: always present; a short text message
* <tt>pictureCollectionsBy(callback)</tt> invokes the callback repeatedly, passing an array of objects representing photo collections managed by the user. The properties of each photoCollection are:
* <tt>source</tt>: always present; the name of the service that provided the update
** <tt>name</tt>: always present; a name for the collection
* <tt>sourceLink</tt>: always present; a link to the page of the service that provided the update
** <tt>created_time</tt>: optional; the time the collection was created, in a form that <tt>new Date()</tt> can parse.
* <tt>link</tt>: optional; a link to more detail for the update
** <tt>location</tt>: optional; a location for the collection
** <tt>primaryPhotoThumbnailURL</tt>: optional; a URL to an image that is a thumbnail for the collection
** <tt>primaryPhotoURL</tt>: optional; a URL for more detail about the primaryPhoto
** <tt>getPhotos(callback)</tt>: a function that, when invoked, returns an array of photo objects through the callback (see below)


* <tt>pictureCollectionsBy(callback)</tt>
* <tt>picturesOf(callback)</tt> invokes the callback, passing an array of objects representing photos of the contact.  The objects are photos, see below.
 
* The getPhotos (of a collection) and picturesOf methods produce a list of pictures  The fields of each picture are:
** <tt>name</tt>: optional; a filename or label for the picture
** <tt>homeURL</tt>: the URL of a page containing more detail about a picture
** <tt>location</tt>: optional; the location of the picture
** <tt>photoThumbnailURL</tt>: a URL to an image that is a thumbnail of this image
 
* <tt>sendPrivateMessageTo(message, callback)</tt> submits the given message to a service of the contact that will deliver the message privately.  (Note that the message may be subject to significant restrictions; we need to provide a better API to understand character limits, two-way permissions, etc.)
348

edits