Welcome, guest Sign In

Single Update

Description

Use this URI to insert, modify, or delete a single update for the specified user.

URI

http://social.yahooapis.com/v1/user/{guid}/updates/{source}/{suid}

This URI contains the following variables:

  • {guid} - Identifies the user whose action generates the update. The value of the collectionID element of the Update Object also contains the GUID.
  • {source} - Identifies the application or Yahoo! site that creates the update. The value of the source element of the Update Object matches the {source} of the URI.
  • {suid} - Identifies the update. See the following section for details.

SUID Identifier

The SUID is one of the fields that identifies an update. A combination of the GUID, source, and SUID uniquely identifies an update. The SUID is an arbitrary string assigned by the application or Yahoo! site when the update is created. When an application calls HTTP PUT with the above URI, the application must specify the SUID in the URI and in the request body.

For a given source, the same SUID value can be shared by multiple updates that are related to a single activity or User Generated Content (UGC). For example, suppose that user A comments on a blog post that was created earlier by user B. In this case, two distinct updates with the same SUID should be generated:

  1. For user A, one update indicates that he or she commented on B's post. Because this update is owned by A, the collectionID is the GUID of user A.
  2. For user B, another update indicates that user A commented on his or her post. The collectionID of this update is the GUID of user B.

Both of these updates would link to the same UGC: the comment made by user A. When the comment is made, the application must create (PUT) two updates. Similarly, if the comment is deleted later on, the application must call two DELETE operations (one for each distinct update).

Filters

Not available.

HTTP Operations Supported

  • GET
  • PUT
  • DELETE

Query Parameters Supported

  • format
  • lang
  • transform

Matrix Parameters Supported

Not available.

Scopes Required

  • GET: Read (Shared) Yahoo! Profiles; Read Yahoo! Updates
  • PUT: Read/Write Yahoo! Updates
  • DELETE: Read/Write Yahoo! Updates

Elements of the Updates Object

Element JSON Data Type XML Schema Data Type Required for Write? Read Only? Description
ACL string string No Yes The Access Control List that defines who can access this update. The ACL is set by the source that created the update. The default access is public. For the allowed values, see Access Control List (ACL).
class string (maximum 256 chars) string Yes No The event class. The only allowed value is the string "app".
collectionID string (maximum 256 chars) string Yes No The GUID of the update's author, that is, the user whose action generated the update.
collectionType string (maximum 256 chars) string Yes No The only allowed value is the string "guid".
description string (maximum 256 chars) string No No Arbitrary string about the update, typically a snippet of the User Generated Content (UGC). For example, the first 50 characters of a blog post followed by "...".
language string (maximum 256 chars) string No No The language in which the updates content is written, specified by an RFC 4646 language. To learn how to set the value for the language, see the description of the lang query parameter.
lastUpdated string string No No A numeric value. Since this is a string, the numeric value must be enclosed in quotation marks. This is the timestamp, in RFC 3339 format, representing the date the UGC for the update was last changed.
lastUpdatedTime string string No No A numeric value surrounded by quotes. This is the timestamp, in RFC 3339 format, representing the time the UGC for the update was last changed.
link string (maximum 1024 chars) string Yes No The URL where the users will land when they click on the update. Usually, this URL points to the UGC related to the update. For example, if a user creates a blog post, the URL points to the blog post. If a user uploads a photo, the URL points to the photo. For an application-generated event, the URL might point to the application.
loc_gender string string No Yes The gender of the update author or the number of individual updates grouped into this update. Sample values: Male, Female, Neutral, Double, Triple, Many
loc_iconURL string string No Yes The URL of the Yahoo! site (property) icon, for example: http://www.flickr.com/images/tinylogo.jp
loc_longForm string string No Yes A string based on loc_longFormRaw but with the variables replaced. For example: Emily wrote a line on Buzz.
loc_longFormRaw string string No Yes A string that contains the update's topic sentence. The variables in the sentence are not substituted (see loc_longForm). Example: {profile_nickname} wrote a line on {title}.
loc_Name string string No Yes The Yahoo! site (property) name, for example, Flickr.
loc_oneWord string string No Yes A word that describes or summarizes the action taken in the update, for example, Studying. In English, this word is usually a single word that is a gerund, but in other languages, it might be a phrase.
loc_topLevelURL string string No Yes The URL of Yahoo! site (property) top URL, for example: http://www.flickr.com
profile_created string string No Yes Date and time when the profile was created, in the format specified by RFC 3339.
profile_displayimage string string No Yes A square containing the user's image on Yahoo! Profiles.
profile_displayImageSize string string No Yes The size of the profile image.
profile_gender string string No Yes The profile owner's gender.
profile_guid string string No Yes The profile owner's GUID.
profile_nickname string string No Yes The profile owner's nickname.
profile_URL string string No Yes The location of the user's profile.
pubDate string (maximum 20 chars) integer Yes No The timestamp, in standard Unix timestamp format, represents the UGC time for when the update was first published.You may use any date in the past, but do you cannot use a date more than 48 hours into the future.
publishedTime string (maximum 20 chars) integer Yes No The timestamp, in RFC 3339 format, representing the time the UGC for the update was first published.
SCL string string No Yes The Syndication Control List (SCL) indicates who should be allowed to access this update. The SCL is set by the user on the "Manage My Updates" tab of Yahoo! Profiles. The default access is public. For the allowed values, see Syndication Control List (SCL).
source string (maximum 256 chars) string Yes No Identifies the application or Yahoo! site (property) that generated the update.

When identifying an application, the format of source is APP.appid, where the appid variable is the application identifier. The appid allows the application to interact with OAuth-enabled and public Yahoo! APIs. The appid in source must match the appid in the authentication header. If they do not match, an error occurs, as shown in sample error response.

If a Yahoo! site created the update, the value of source starts with "y", followed by the country code, followed by a variable string. Examples: y.ca.travel, y.ca.lifestyle

suid string (maximum 256 chars) string Yes No For a given application (source) and GUID (collectionID), the suid uniquely identifies the update. See also SUID Identifier.
title string (maximum 256 chars) string Yes No The name of the object or event associated with the update. For example, the title of a song might be "Take the A Train" and the title of a photo might be "my dog Sam".
type string (maximum 256 chars) string Yes No The update type. Allowed values: appInstall, appActivity, or appActivity2. The meaning of the chosen value is up to the application that creates the update.
uri string (maximum 1024 chars) string No Yes A link to the actual resource, the URI.

Example JSON Response Body for GET Single Update

This example gets an update posted by the user specified by the GUID U7KVXD6ZBCOTL2IFLQH3M5KAI5. The source of the update is APP.-mnHRuo27. The SUID for the update is s.661237913473503069. Here's the URI for the GET:

http://social.yahooapis.com/v1/user/U7KVXD6ZBCOTL2IFLQH3M5KAI5/updates/APP.-mnHRuo27/s.661237913473503069?format=json

Response body:

Example XML Response Body for GET Single Update

URI for GET:

http://social.yahooapis.com/v1/user/U7KVXD6ZBCOTL2IFLQH3M5KAI5/updates/APP.-mnHRuo27/s.661237913473503069?format=xml

Response body:

Example JSON Request Body for PUT Update

This example creates a new update by calling HTTP PUT on the following URI:

http://social.yahooapis.com/v1/user/U7KVXD6ZBCOTL2IFLQH3M5KAI5/updates/APP.-mnHRuo27/calApp-1254344156?format=json

Request body:

Response body for success (200 OK):

Example XML Request Body for PUT Update

Response body for success (200 OK):

Example JSON Response Body for DELETE Update

URI for DELETE:

http://social.yahooapis.com/v1/user/U7KVXD6ZBCOTL2IFLQH3M5KOIA/updates/APP.-mnHRuo27/s.661237913473503069?format=json

Response body:

Example XML Response Body for DELETE Update

Table of Contents

Copyright © 2009 Yahoo! Inc. All rights reserved. Copyright | Privacy Policy

Help us continue to improve the Yahoo! Developer Network: Send Your Suggestions