google_Glass_API_开发指南(google翻译附英文).doc

google_Glass_API_开发指南(google翻译附英文).doc

  1. 1、本文档共48页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 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.1 Host: Authorization: Bearer {auth token} Content-Type: application/json Content-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 Created Date: Tue, 25 Sep 2012 23:30:11 GMT Content-Type: application/json Content-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

文档评论(0)

gangshou + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档