- 1、本文档共48页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
开发指南
时间轴Timeline)
你的用户的时间轴被分为时间表项目。您可以使用API??接入和管理项目通过HTTP的REST操作时间表。Your users timeline is divided up into timeline items. You can use the API to insert and manage timeline items with REST operations over HTTP.)
???
注意:时间轴的产品最后七天在用户的玻璃和30天镜象API。Note:?Timeline items last for seven days on a users Glass and 30 days in the Mirror API.)
插入一个简单的时间轴项目
阅读时间表项目
插入一个时间表与媒体项目
访问附件
捆绑卡
用户交互菜单项
使用内置的菜单项
定义自定义菜单项
允许用户固定时间表卡
插入一个简单的时间轴项目
要插入一个时间表项,POST一个?JSON表示的时间表项目的REST端点。
大多数字段都是可选的。最简单的形式,一个时间表项目只包含一个简短的文字消息。这是一个简单的时间表项目如何被插入。To?insert?a timeline item, POST a?JSON representation of a timeline item?to the REST endpoint.
Most of the fields are optional. In simplest form, a timeline item contains only a short text message. This is how a simple timeline item is inserted.
)
原始HTTP的Java的
POST /mirror/v1/timeline HTTP/1.1Host: Authorization: Bearer {auth token}Content-Type: application/jsonContent-Length: 26{ text: Hello world }
Java的TimelineItem timelineItem = new TimelineItem();timelineItem.setText(Hello world);service.timeline().insert(timelineItem).execute();
在成功时,服务器会返回一个201响应代码创建创建项目的完整副本。对于上面的例子,可能看起来像一个成功的响应:On success, the server will return a 201 Created response code with a full copy of the created item. For the example above, a successful response might look like:)
原始的HTTP
HTTP/1.1 201 CreatedDate: Tue, 25 Sep 2012 23:30:11 GMTContent-Type: application/jsonContent-Length: 303{?kind: glass#timelineItem,?id: 1234567890,?selfLink: /mirror/v1/timeline/1234567890,?created: 2012-09-25T23:28:43.192Z,?updated: 2012-09-25T23:28:43.192Z,?etag: \G5BI0RWvj-0jWdBrdWrPZV7xPKw/t25selcGS3uDEVT6FB09hAG-QQ\,?text: Hello world}
插入项目,将出现在用户的时间轴看起来像这样:The inserted item that would appear in the users timeline looks like this:)
阅读时间表项目Reading timeline items)
你的服务可以访问所有的时间表,它创建项目,以及所有共享项目时间表。以下是如何?为您服务是可见的项目列出时间表。Your service can access all timeline items that it created, and all timeline items that were shared with it. Heres how to?list?the timeline items that are vi
您可能关注的文档
最近下载
- 第一单元龙的传人第1课我的名字 教案(表格式)一年级美术人教版(2024版).docx
- 广州数控GSK988Ti系列 编程操作手册2017年1月.pdf
- 台达伺服ASDA-AB系列应用技术手册.pdf
- (宪法)完整版课件.ppt
- 20241103-高盛-美国经济分析:2025年消费支出展望,回归正常稳健增速(摘要).docx VIP
- 高盛-中国房地产行业2025年展望-触底在望(摘要).pdf VIP
- 张毅—潜在失效模式与效应分析(三)课件.pptx VIP
- 茶文化考核试题及答案.pdf VIP
- 人教版(2024)七年级地理上册4.2《气温的变化与分布》优质课件.pptx
- 教科版科学三年级上册2空气占据空间吗 (说课课件)(共13张PPT).pptx
文档评论(0)