- 12
- 0
- 约6.07万字
- 约 48页
- 2016-04-13 发布于浙江
- 举报
google glass api 开发指南(google翻译附英文)
开发指南
时间轴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 visi
您可能关注的文档
- android解析json总结.doc
- apec后新12国免签.doc
- api5ct 第九版换版宣贯.ppt
- android大型游戏特效开启教程.doc
- arcgis三维开发帮助文档(vb).doc
- arcgis的拓扑关系运算功能介绍.doc
- autocad 2008命令.doc
- asterisk入门资料.doc
- android智能电视app开发笔记(二)android开发环境搭建.doc
- atm和pos-协议和接口.ppt
- 全过程工程管理造价咨询工程监理项目服务方案投标方案(技术部分).doc
- 招标代理服务投标技术服务方案(技术方案).doc
- AI大模型与AIGC技术在公安领域的应用解决方案(99页 PPT).pptx
- 工业4.0智能制造数字工厂规划方案.pptx
- 树立社会主义核心价值观.docx
- 三年(2023-2025)中考历史真题分类汇编(全国)专题21 科技文化与社会生活(解析版).docx
- 2025年中考道德与法治真题完全解读(吉林卷).pdf
- 2025年中考道德与法治真题完全解读(安徽卷).pdf
- 三年(2023-2025)中考历史真题分类汇编(全国)专题14 人民解放战争(解析版).pdf
- 三年(2023-2025)广东中考历史真题分类汇编:专题03 中国近代史(八年级上册)(解析版).docx
最近下载
- 《基因组学》(第4版)-复旦大学 14-第7章 基因的转录调控-PolI和PolIII类基因.pptx VIP
- 《基因组学》(第4版)-复旦大学 13-第6章 基因组解剖-原核生物及细胞器基因组.ppt VIP
- 19.1.1.1 常量与变量 人教版数学八年级下册同步练习(含答案).docx VIP
- 《基因组学》(第4版)-复旦大学 28-第11章 基因组复制-真核生物.ppt VIP
- 希沃白板运用培训ppt课件.pptx
- 《基因组学》(第4版)-复旦大学 3-第1章 基因组-DNA RNA 蛋白质.ppt VIP
- 《基因组学》(第4版)-复旦大学 32-第13章 基因组进化的模式-基因水平的进化.pptx VIP
- 《输变电工程建设前期手续清单》.doc VIP
- 2023-2024学年广东省中山市高二(上)期末考试物理试卷+答案解析.pdf VIP
- 不锈钢轨道车辆激光焊技术规范.docx VIP
原创力文档

文档评论(0)