Updates - Yahoo Developer Network

advertisement
Yahoo! Updates
Social Notification Platform
John performs a social
action on My Site.
1
Rating, Review, Comment,
Upload, Favorite, etc.
My Site
2
developer.yahoo.com/updates
Yahoo! Updates are displayed across the Yahoo! Network:
John authorizes My Site to share his activity with Yahoo!.
John commented:
This is an awesome site!!!
3
The Update is generated and published on the Yahoo! Network.
MESSENGER
90M USERS
Updates
YAHOO! MAIL
300M USERS
HOMEPAGE
300M USERS
John commented on My Site.
My Site.
Sue listened to Girl by Beck.
Beck.
REFERRAL
TRAFFIC
4
Meg tweeted out in downtown.
MY YAHOO!
40M USERS
YAHOO! PROFILES
John’s friends and Yahoo! users see his Update
and can follow the link back to My Site.
YAHOO! USERS
Y! TOOLBAR
YAHOO! MEDIA PROPERTIES
OFF NETWORK PARTNERS
JOHN’S FRIENDS
About Yahoo! Updates
What are GUIDs and SUIDs?
Updates are a stream of snippets—summaries of user
generated content and activity that contain a link back
to the website or app that spawned the update. They are
generated by Yahoo! sites and Web applications, such
as restaurant reviews on Yahoo! Local, photo uploads to
Flickr, blog posts, and more than 150 other actions.
A GUID is a string randomly generated by Yahoo! that
uniquely identifies a user. A SUID is a string assigned by an
application or a Yahoo! site when an update is created. The
SUID is a required component of all calls to edit, delete,
or manipulate an update you’ve published. The SUID in
combination with the GUID and an update source, such as
an application, uniquely identifies an update.
Individual updates are indexed by user, then organized
into ‘streams’ by relationship, so that a user can easily
keep in touch with what their connections (friends)
are doing online. The Updates Platform is completely
open, and your application can publish and/or read
these streams to help generate referral traffic and build
engaging experiences.
The following variables are used in the URIs for the
Updates API:
-!
-!
-!
{guid} – the GUID value for the user.
{suid} – the SUID value for the update.
{source} – the source of the update, such as an
application or a Yahoo! site.
All Updates
To get a collection of the most recent updates generated by a user, specify the {guid} in the URI. The response contains a
collection of updates with the same fields as the Single Update. This resource is read-only.
METHOD
GET
URL SYNTAX AND EXAMPLE
SYNTAX
EX
http://social.yahooapis.com/v1/user/
{guid}/updates
http://social.yahooapis.com/v1/user/
U7KVXD6ZBCOTL2IFLQH3M5KAI5/updates
Getting Started
1
2
QUERY
PARAMETERS
format
lang
transform
start
count
Read the documentation:
developer.yahoo.com/social/rest_api_ref/
updates_api.html
Call the Updates API from the YQL Console:
developer.yahoo.com/yql/console
SELECT * FROM social.updates WHERE guid=me
RESPONSE FIELDS
ACL
class
collectionID
collectionType
description
language
lastUpdated
lastUpdatedTime
link
loc_gender
loc_iconURL
3
4
loc_longForm
loc_Name
loc_oneWord
loc_topLevelURL
profile_created
profile_displayimage
profile_
displayImageSize
profile_gender
profile_guid
profile_nickname
profile_URL
pubDate
publishedTime
SCL
source
suid
title
type
uri
Download the Yahoo! Social SDK for PHP:
github.com/yahoo/yos-social-php
Complete the tutorial My Social PHP Application:
developer.yahoo.com/yap/guide/other-code-exs.
html#my_social
developer.yahoo.com
Yahoo! Updates
Social Notification Platform
Single Update
To add, remove, or get a single update, you specify the {guid}, {suid}, and {source} in the URI.
METHOD
GET
SYNTAX
EX
METHOD
PUT
(Add
Updates)
METHOD
DELETE
QUERY
PARAMETERS
URL SYNTAX AND EXAMPLE
http://social.yahooapis.com/v1/user/
{guid}/updates/{source}/{suid}
http://social.yahooapis.com/v1/user/
U7KVXD6ZBCOTL2IFLQH3M5KAI5/updates/
APP.-yossd3e/photo129B
EX
ACL
class
collectionID
collectionType
description
language
lastUpdated
lastUpdatedTime
link
loc_gender
loc_iconURL
QUERY
PARAMETERS
URL SYNTAX AND EXAMPLE
SYNTAX
format
lang
transform
http://social.yahooapis.com/v1/user/
{guid}/updates/{source}/{suid}
http://social.yahooapis.com/v1/user/
U7KVXD6ZBCOTL2IFLQH3M5KAI5/updates/
APP.-yossd3e/photo129B
format
lang
transform
RESPONSE FIELDS
profile_URL
pubDate
publishedTime
SCL
source
suid
title
type
uri
REQUEST FIELDS
class
collectionID
collectionType
description
language
lastUpdated
URL SYNTAX AND EXAMPLE
SYNTAX
loc_longForm
loc_Name
loc_oneWord
loc_topLevelURL
profile_created
profile_displayimage
profile_
displayImageSize
profile_gender
profile_guid
profile_nickname
language
lastUpdated
lastUpdatedTime
link
pubDate
publishedTime
source
suid
title
type
QUERY PARAMETERS
http://social.yahooapis.com/v1/user/{guid}/updates/{source}/{suid}
(Remove
Updates)
format
lang
transform
Updates for Connections
To get the most recent updates for the connections (friends) of the user, specify the {guid} in the URI. The information
returned includes profile data of the user’s connections.
METHOD
GET
URL SYNTAX AND EXAMPLE
SYNTAX
http://social.yahooapis.com/v1/user/
{guid}/updates/connections
QUERY PARAMETERS
RESPONSE FIELDS
format
lang
transform
(See response fields for Single Update)
start
count
Query Parameters
Key-value pairs appended to an endpoint that control the format, language, and number of updates in a response.
KEYS
VALUES
SYNTAX
DESCRIPTION
format
xml, json
format=xml
Response format.
lang
A comma-separated list of RFC 4646 basic
language ranges in descending priority order.
lang=en-US,
es-ES
The desired human languages for a representation.
transform
all
grouping
intersection
limit
transform=all
This filters a set of updates using one or more
transform/transform-specifier pairs. For more info on
transform: developer.yahoo.com/social/rest_api_guide/
start
non-negative integer
start=0
The first item returned by GET. Default is 0.
count
non-negative integer
count=20
The number of items returned by GET. Default is 10.
select
sort
union
queryParams.html#transformQueryParameter
Resources
YAHOO! UPDATES API
YAHOO! SOCIAL SDKS
YAHOO! UPDATES FORUM
developer.yahoo.com/social/updates
developer.yahoo.com/social/sdk
UPDATES API DOCUMENTATION
MY SOCIAL PHP APPLICATION
developer.yahoo.net/forum/index.
php?showforum=46
developer.yahoo.com/social/rest_api_
guide/updates_api.html
developer.yahoo.com/yap/guide/other-code-exs.
html#my_social
developer.yahoo.com
Download