Google+ 开放搜索和对话数据 API

Google+ 开放搜索和对话数据 API_第1张图片

Google+今天上午发布了搜索和对话两个新API:搜索和对话数据。

搜索

搜索帖子,请求格式:

GET
https://www.googleapis.com/plus/v1/activities?query=cookie%20recipes&orderBy=best&key=[yourAPIKey]

返回数据:

{
"kind": "plus#activityFeed",
"title": "Plus Search for cookie recipes",
"updated": "2011-09-30T16:57:34.479Z",
"id": "tag:google.com,2010:buzz-search-feed:x4rIYTKpR7NZCL8Id8RHXQ",
"items": [
{
"kind": "plus#activity",
“id”: “123”,
"title": "You have to try these out.",
"object": {
"objectType": "note",
"content": "I’m baking halloween cookies!",
},
{
"kind": "plus#activity",
“id”: “456”,
"title": "Cookies",
"object": {
"objectType": "note",
"content": "Cookies and milk for dinner. Don’t judge me.",
},
]
}

搜索用户, 请求格式

GET https://www.googleapis.com/plus/v1/people?query=vic%20gundotra&key=[yourAPIKey]

返回数据包括姓名、介绍等字段。

对话

通过下面的请求可以获取某个主题相关的分享及+1的数据

GET https://www.googleapis.com/plus/v1/activities/{activityId}/people/resharers?key=[yourAPIKey]
GET https://www.googleapis.com/plus/v1/activities/{activityId}/people/plusoners?key=[yourAPIKey]

下面的请求可以获取主题的全部或某个特定回复

GET https://www.googleapis.com/plus/v1/activities/{activityId}/comments?key=[yourAPIKey]
GET https://www.googleapis.com/plus/v1/comment/{commentId}?key=[yourAPIKey]

更详细的API数据已经更新到了 https://developers.google.com/+/overview

同时也希望大家能多通过Google Groups或issue tracker和Google工程师们交流。

via Google Code blog

© im007boy 发表于 谷奥——探寻谷歌的奥秘 ( http://www.guao.hk ), 2011. | 1 条评论 | 永久链接 | 关于谷奥 | 投稿/爆料
Post tags: API, Google Plus

你可能感兴趣的:(api,Google,Google新闻,Plus)