blob: a18dcd1e3b8c1043595a7f9ac9b821324fb43373 [file] [log] [blame]
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/glass.location": {
"description": "View your location"
},
"https://www.googleapis.com/auth/glass.timeline": {
"description": "View and manage your Glass timeline"
}
}
}
},
"basePath": "/mirror/v1/",
"baseUrl": "https://www.googleapis.com/mirror/v1/",
"batchPath": "batch/mirror/v1",
"description": "Interacts with Glass users via the timeline.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/glass",
"etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/VBq6C_BZt0ODBHsCfCoc3annqZk\"",
"icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
},
"id": "mirror:v1",
"kind": "discovery#restDescription",
"labels": [
"limited_availability"
],
"name": "mirror",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"alt": {
"default": "json",
"description": "Data format for the response.",
"enum": [
"json"
],
"enumDescriptions": [
"Responses with Content-Type of application/json"
],
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
"location": "query",
"type": "string"
},
"userIp": {
"description": "Deprecated. Please use quotaUser instead.",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"accounts": {
"methods": {
"insert": {
"description": "Inserts a new account for a user",
"httpMethod": "POST",
"id": "mirror.accounts.insert",
"parameterOrder": [
"userToken",
"accountType",
"accountName"
],
"parameters": {
"accountName": {
"description": "The name of the account to be passed to the Android Account Manager.",
"location": "path",
"required": true,
"type": "string"
},
"accountType": {
"description": "Account type to be passed to Android Account Manager.",
"location": "path",
"required": true,
"type": "string"
},
"userToken": {
"description": "The ID for the user.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "accounts/{userToken}/{accountType}/{accountName}",
"request": {
"$ref": "Account"
},
"response": {
"$ref": "Account"
}
}
}
},
"contacts": {
"methods": {
"delete": {
"description": "Deletes a contact.",
"httpMethod": "DELETE",
"id": "mirror.contacts.delete",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the contact.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "contacts/{id}",
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
},
"get": {
"description": "Gets a single contact by ID.",
"httpMethod": "GET",
"id": "mirror.contacts.get",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the contact.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "contacts/{id}",
"response": {
"$ref": "Contact"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
},
"insert": {
"description": "Inserts a new contact.",
"httpMethod": "POST",
"id": "mirror.contacts.insert",
"path": "contacts",
"request": {
"$ref": "Contact"
},
"response": {
"$ref": "Contact"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
},
"list": {
"description": "Retrieves a list of contacts for the authenticated user.",
"httpMethod": "GET",
"id": "mirror.contacts.list",
"path": "contacts",
"response": {
"$ref": "ContactsListResponse"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
},
"patch": {
"description": "Updates a contact in place. This method supports patch semantics.",
"httpMethod": "PATCH",
"id": "mirror.contacts.patch",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the contact.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "contacts/{id}",
"request": {
"$ref": "Contact"
},
"response": {
"$ref": "Contact"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
},
"update": {
"description": "Updates a contact in place.",
"httpMethod": "PUT",
"id": "mirror.contacts.update",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the contact.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "contacts/{id}",
"request": {
"$ref": "Contact"
},
"response": {
"$ref": "Contact"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
}
}
},
"locations": {
"methods": {
"get": {
"description": "Gets a single location by ID.",
"httpMethod": "GET",
"id": "mirror.locations.get",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the location or latest for the last known location.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "locations/{id}",
"response": {
"$ref": "Location"
},
"scopes": [
"https://www.googleapis.com/auth/glass.location",
"https://www.googleapis.com/auth/glass.timeline"
]
},
"list": {
"description": "Retrieves a list of locations for the user.",
"httpMethod": "GET",
"id": "mirror.locations.list",
"path": "locations",
"response": {
"$ref": "LocationsListResponse"
},
"scopes": [
"https://www.googleapis.com/auth/glass.location",
"https://www.googleapis.com/auth/glass.timeline"
]
}
}
},
"settings": {
"methods": {
"get": {
"description": "Gets a single setting by ID.",
"httpMethod": "GET",
"id": "mirror.settings.get",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the setting. The following IDs are valid: \n- locale - The key to the user’s language/locale (BCP 47 identifier) that Glassware should use to render localized content. \n- timezone - The key to the user’s current time zone region as defined in the tz database. Example: America/Los_Angeles.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "settings/{id}",
"response": {
"$ref": "Setting"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
}
}
},
"subscriptions": {
"methods": {
"delete": {
"description": "Deletes a subscription.",
"httpMethod": "DELETE",
"id": "mirror.subscriptions.delete",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the subscription.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "subscriptions/{id}",
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
},
"insert": {
"description": "Creates a new subscription.",
"httpMethod": "POST",
"id": "mirror.subscriptions.insert",
"path": "subscriptions",
"request": {
"$ref": "Subscription"
},
"response": {
"$ref": "Subscription"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
},
"list": {
"description": "Retrieves a list of subscriptions for the authenticated user and service.",
"httpMethod": "GET",
"id": "mirror.subscriptions.list",
"path": "subscriptions",
"response": {
"$ref": "SubscriptionsListResponse"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
},
"update": {
"description": "Updates an existing subscription in place.",
"httpMethod": "PUT",
"id": "mirror.subscriptions.update",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the subscription.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "subscriptions/{id}",
"request": {
"$ref": "Subscription"
},
"response": {
"$ref": "Subscription"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
}
}
},
"timeline": {
"methods": {
"delete": {
"description": "Deletes a timeline item.",
"httpMethod": "DELETE",
"id": "mirror.timeline.delete",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the timeline item.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "timeline/{id}",
"scopes": [
"https://www.googleapis.com/auth/glass.location",
"https://www.googleapis.com/auth/glass.timeline"
]
},
"get": {
"description": "Gets a single timeline item by ID.",
"httpMethod": "GET",
"id": "mirror.timeline.get",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the timeline item.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "timeline/{id}",
"response": {
"$ref": "TimelineItem"
},
"scopes": [
"https://www.googleapis.com/auth/glass.location",
"https://www.googleapis.com/auth/glass.timeline"
]
},
"insert": {
"description": "Inserts a new item into the timeline.",
"httpMethod": "POST",
"id": "mirror.timeline.insert",
"mediaUpload": {
"accept": [
"audio/*",
"image/*",
"video/*"
],
"maxSize": "10MB",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/mirror/v1/timeline"
},
"simple": {
"multipart": true,
"path": "/upload/mirror/v1/timeline"
}
}
},
"path": "timeline",
"request": {
"$ref": "TimelineItem"
},
"response": {
"$ref": "TimelineItem"
},
"scopes": [
"https://www.googleapis.com/auth/glass.location",
"https://www.googleapis.com/auth/glass.timeline"
],
"supportsMediaUpload": true
},
"list": {
"description": "Retrieves a list of timeline items for the authenticated user.",
"httpMethod": "GET",
"id": "mirror.timeline.list",
"parameters": {
"bundleId": {
"description": "If provided, only items with the given bundleId will be returned.",
"location": "query",
"type": "string"
},
"includeDeleted": {
"description": "If true, tombstone records for deleted items will be returned.",
"location": "query",
"type": "boolean"
},
"maxResults": {
"description": "The maximum number of items to include in the response, used for paging.",
"format": "uint32",
"location": "query",
"type": "integer"
},
"orderBy": {
"description": "Controls the order in which timeline items are returned.",
"enum": [
"displayTime",
"writeTime"
],
"enumDescriptions": [
"Results will be ordered by displayTime (default). This is the same ordering as is used in the timeline on the device.",
"Results will be ordered by the time at which they were last written to the data store."
],
"location": "query",
"type": "string"
},
"pageToken": {
"description": "Token for the page of results to return.",
"location": "query",
"type": "string"
},
"pinnedOnly": {
"description": "If true, only pinned items will be returned.",
"location": "query",
"type": "boolean"
},
"sourceItemId": {
"description": "If provided, only items with the given sourceItemId will be returned.",
"location": "query",
"type": "string"
}
},
"path": "timeline",
"response": {
"$ref": "TimelineListResponse"
},
"scopes": [
"https://www.googleapis.com/auth/glass.location",
"https://www.googleapis.com/auth/glass.timeline"
]
},
"patch": {
"description": "Updates a timeline item in place. This method supports patch semantics.",
"httpMethod": "PATCH",
"id": "mirror.timeline.patch",
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the timeline item.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "timeline/{id}",
"request": {
"$ref": "TimelineItem"
},
"response": {
"$ref": "TimelineItem"
},
"scopes": [
"https://www.googleapis.com/auth/glass.location",
"https://www.googleapis.com/auth/glass.timeline"
]
},
"update": {
"description": "Updates a timeline item in place.",
"httpMethod": "PUT",
"id": "mirror.timeline.update",
"mediaUpload": {
"accept": [
"audio/*",
"image/*",
"video/*"
],
"maxSize": "10MB",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/mirror/v1/timeline/{id}"
},
"simple": {
"multipart": true,
"path": "/upload/mirror/v1/timeline/{id}"
}
}
},
"parameterOrder": [
"id"
],
"parameters": {
"id": {
"description": "The ID of the timeline item.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "timeline/{id}",
"request": {
"$ref": "TimelineItem"
},
"response": {
"$ref": "TimelineItem"
},
"scopes": [
"https://www.googleapis.com/auth/glass.location",
"https://www.googleapis.com/auth/glass.timeline"
],
"supportsMediaUpload": true
}
},
"resources": {
"attachments": {
"methods": {
"delete": {
"description": "Deletes an attachment from a timeline item.",
"httpMethod": "DELETE",
"id": "mirror.timeline.attachments.delete",
"parameterOrder": [
"itemId",
"attachmentId"
],
"parameters": {
"attachmentId": {
"description": "The ID of the attachment.",
"location": "path",
"required": true,
"type": "string"
},
"itemId": {
"description": "The ID of the timeline item the attachment belongs to.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "timeline/{itemId}/attachments/{attachmentId}",
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
},
"get": {
"description": "Retrieves an attachment on a timeline item by item ID and attachment ID.",
"httpMethod": "GET",
"id": "mirror.timeline.attachments.get",
"parameterOrder": [
"itemId",
"attachmentId"
],
"parameters": {
"attachmentId": {
"description": "The ID of the attachment.",
"location": "path",
"required": true,
"type": "string"
},
"itemId": {
"description": "The ID of the timeline item the attachment belongs to.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "timeline/{itemId}/attachments/{attachmentId}",
"response": {
"$ref": "Attachment"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
],
"supportsMediaDownload": true
},
"insert": {
"description": "Adds a new attachment to a timeline item.",
"httpMethod": "POST",
"id": "mirror.timeline.attachments.insert",
"mediaUpload": {
"accept": [
"audio/*",
"image/*",
"video/*"
],
"maxSize": "10MB",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/mirror/v1/timeline/{itemId}/attachments"
},
"simple": {
"multipart": true,
"path": "/upload/mirror/v1/timeline/{itemId}/attachments"
}
}
},
"parameterOrder": [
"itemId"
],
"parameters": {
"itemId": {
"description": "The ID of the timeline item the attachment belongs to.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "timeline/{itemId}/attachments",
"response": {
"$ref": "Attachment"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
],
"supportsMediaUpload": true
},
"list": {
"description": "Returns a list of attachments for a timeline item.",
"httpMethod": "GET",
"id": "mirror.timeline.attachments.list",
"parameterOrder": [
"itemId"
],
"parameters": {
"itemId": {
"description": "The ID of the timeline item whose attachments should be listed.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "timeline/{itemId}/attachments",
"response": {
"$ref": "AttachmentsListResponse"
},
"scopes": [
"https://www.googleapis.com/auth/glass.timeline"
]
}
}
}
}
}
},
"revision": "20180315",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"Account": {
"description": "Represents an account passed into the Account Manager on Glass.",
"id": "Account",
"properties": {
"authTokens": {
"items": {
"$ref": "AuthToken"
},
"type": "array"
},
"features": {
"items": {
"type": "string"
},
"type": "array"
},
"password": {
"type": "string"
},
"userData": {
"items": {
"$ref": "UserData"
},
"type": "array"
}
},
"type": "object"
},
"Attachment": {
"description": "Represents media content, such as a photo, that can be attached to a timeline item.",
"id": "Attachment",
"properties": {
"contentType": {
"description": "The MIME type of the attachment.",
"type": "string"
},
"contentUrl": {
"description": "The URL for the content.",
"type": "string"
},
"id": {
"description": "The ID of the attachment.",
"type": "string"
},
"isProcessingContent": {
"description": "Indicates that the contentUrl is not available because the attachment content is still being processed. If the caller wishes to retrieve the content, it should try again later.",
"type": "boolean"
}
},
"type": "object"
},
"AttachmentsListResponse": {
"description": "A list of Attachments. This is the response from the server to GET requests on the attachments collection.",
"id": "AttachmentsListResponse",
"properties": {
"items": {
"description": "The list of attachments.",
"items": {
"$ref": "Attachment"
},
"type": "array"
},
"kind": {
"default": "mirror#attachmentsList",
"description": "The type of resource. This is always mirror#attachmentsList.",
"type": "string"
}
},
"type": "object"
},
"AuthToken": {
"id": "AuthToken",
"properties": {
"authToken": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"Command": {
"description": "A single menu command that is part of a Contact.",
"id": "Command",
"properties": {
"type": {
"annotations": {
"required": [
"mirror.contacts.insert",
"mirror.contacts.update"
]
},
"description": "The type of operation this command corresponds to. Allowed values are: \n- TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the \"Take a note\" voice menu command. \n- POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the \"Post an update\" voice menu command.",
"type": "string"
}
},
"type": "object"
},
"Contact": {
"description": "A person or group that can be used as a creator or a contact.",
"id": "Contact",
"properties": {
"acceptCommands": {
"description": "A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command.",
"items": {
"$ref": "Command"
},
"type": "array"
},
"acceptTypes": {
"description": "A list of MIME types that a contact supports. The contact will be shown to the user if any of its acceptTypes matches any of the types of the attachments on the item. If no acceptTypes are given, the contact will be shown for all items.",
"items": {
"type": "string"
},
"type": "array"
},
"displayName": {
"annotations": {
"required": [
"mirror.contacts.insert",
"mirror.contacts.update"
]
},
"description": "The name to display for this contact.",
"type": "string"
},
"id": {
"annotations": {
"required": [
"mirror.contacts.insert",
"mirror.contacts.update"
]
},
"description": "An ID for this contact. This is generated by the application and is treated as an opaque token.",
"type": "string"
},
"imageUrls": {
"annotations": {
"required": [
"mirror.contacts.insert",
"mirror.contacts.update"
]
},
"description": "Set of image URLs to display for a contact. Most contacts will have a single image, but a \"group\" contact may include up to 8 image URLs and they will be resized and cropped into a mosaic on the client.",
"items": {
"type": "string"
},
"type": "array"
},
"kind": {
"default": "mirror#contact",
"description": "The type of resource. This is always mirror#contact.",
"type": "string"
},
"phoneNumber": {
"description": "Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.",
"type": "string"
},
"priority": {
"description": "Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.",
"format": "uint32",
"type": "integer"
},
"sharingFeatures": {
"description": "A list of sharing features that a contact can handle. Allowed values are: \n- ADD_CAPTION",
"items": {
"type": "string"
},
"type": "array"
},
"source": {
"description": "The ID of the application that created this contact. This is populated by the API",
"type": "string"
},
"speakableName": {
"description": "Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.",
"type": "string"
},
"type": {
"description": "The type for this contact. This is used for sorting in UIs. Allowed values are: \n- INDIVIDUAL - Represents a single person. This is the default. \n- GROUP - Represents more than a single person.",
"type": "string"
}
},
"type": "object"
},
"ContactsListResponse": {
"description": "A list of Contacts representing contacts. This is the response from the server to GET requests on the contacts collection.",
"id": "ContactsListResponse",
"properties": {
"items": {
"description": "Contact list.",
"items": {
"$ref": "Contact"
},
"type": "array"
},
"kind": {
"default": "mirror#contacts",
"description": "The type of resource. This is always mirror#contacts.",
"type": "string"
}
},
"type": "object"
},
"Location": {
"description": "A geographic location that can be associated with a timeline item.",
"id": "Location",
"properties": {
"accuracy": {
"description": "The accuracy of the location fix in meters.",
"format": "double",
"type": "number"
},
"address": {
"description": "The full address of the location.",
"type": "string"
},
"displayName": {
"description": "The name to be displayed. This may be a business name or a user-defined place, such as \"Home\".",
"type": "string"
},
"id": {
"description": "The ID of the location.",
"type": "string"
},
"kind": {
"default": "mirror#location",
"description": "The type of resource. This is always mirror#location.",
"type": "string"
},
"latitude": {
"description": "The latitude, in degrees.",
"format": "double",
"type": "number"
},
"longitude": {
"description": "The longitude, in degrees.",
"format": "double",
"type": "number"
},
"timestamp": {
"description": "The time at which this location was captured, formatted according to RFC 3339.",
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"LocationsListResponse": {
"description": "A list of Locations. This is the response from the server to GET requests on the locations collection.",
"id": "LocationsListResponse",
"properties": {
"items": {
"description": "The list of locations.",
"items": {
"$ref": "Location"
},
"type": "array"
},
"kind": {
"default": "mirror#locationsList",
"description": "The type of resource. This is always mirror#locationsList.",
"type": "string"
}
},
"type": "object"
},
"MenuItem": {
"description": "A custom menu item that can be presented to the user by a timeline item.",
"id": "MenuItem",
"properties": {
"action": {
"description": "Controls the behavior when the user picks the menu option. Allowed values are: \n- CUSTOM - Custom action set by the service. When the user selects this menuItem, the API triggers a notification to your callbackUrl with the userActions.type set to CUSTOM and the userActions.payload set to the ID of this menu item. This is the default value. \n- Built-in actions: \n- REPLY - Initiate a reply to the timeline item using the voice recording UI. The creator attribute must be set in the timeline item for this menu to be available. \n- REPLY_ALL - Same behavior as REPLY. The original timeline item's recipients will be added to the reply item. \n- DELETE - Delete the timeline item. \n- SHARE - Share the timeline item with the available contacts. \n- READ_ALOUD - Read the timeline item's speakableText aloud; if this field is not set, read the text field; if none of those fields are set, this menu item is ignored. \n- GET_MEDIA_INPUT - Allow users to provide media payloads to Glassware from a menu item (currently, only transcribed text from voice input is supported). Subscribe to notifications when users invoke this menu item to receive the timeline item ID. Retrieve the media from the timeline item in the payload property. \n- VOICE_CALL - Initiate a phone call using the timeline item's creator.phoneNumber attribute as recipient. \n- NAVIGATE - Navigate to the timeline item's location. \n- TOGGLE_PINNED - Toggle the isPinned state of the timeline item. \n- OPEN_URI - Open the payload of the menu item in the browser. \n- PLAY_VIDEO - Open the payload of the menu item in the Glass video player. \n- SEND_MESSAGE - Initiate sending a message to the timeline item's creator: \n- If the creator.phoneNumber is set and Glass is connected to an Android phone, the message is an SMS. \n- Otherwise, if the creator.email is set, the message is an email.",
"type": "string"
},
"contextual_command": {
"description": "The ContextualMenus.Command associated with this MenuItem (e.g. READ_ALOUD). The voice label for this command will be displayed in the voice menu and the touch label will be displayed in the touch menu. Note that the default menu value's display name will be overriden if you specify this property. Values that do not correspond to a ContextualMenus.Command name will be ignored.",
"type": "string"
},
"id": {
"description": "The ID for this menu item. This is generated by the application and is treated as an opaque token.",
"type": "string"
},
"payload": {
"description": "A generic payload whose meaning changes depending on this MenuItem's action. \n- When the action is OPEN_URI, the payload is the URL of the website to view. \n- When the action is PLAY_VIDEO, the payload is the streaming URL of the video \n- When the action is GET_MEDIA_INPUT, the payload is the text transcription of a user's speech input",
"type": "string"
},
"removeWhenSelected": {
"description": "If set to true on a CUSTOM menu item, that item will be removed from the menu after it is selected.",
"type": "boolean"
},
"values": {
"description": "For CUSTOM items, a list of values controlling the appearance of the menu item in each of its states. A value for the DEFAULT state must be provided. If the PENDING or CONFIRMED states are missing, they will not be shown.",
"items": {
"$ref": "MenuValue"
},
"type": "array"
}
},
"type": "object"
},
"MenuValue": {
"description": "A single value that is part of a MenuItem.",
"id": "MenuValue",
"properties": {
"displayName": {
"description": "The name to display for the menu item. If you specify this property for a built-in menu item, the default contextual voice command for that menu item is not shown.",
"type": "string"
},
"iconUrl": {
"description": "URL of an icon to display with the menu item.",
"type": "string"
},
"state": {
"description": "The state that this value applies to. Allowed values are: \n- DEFAULT - Default value shown when displayed in the menuItems list. \n- PENDING - Value shown when the menuItem has been selected by the user but can still be cancelled. \n- CONFIRMED - Value shown when the menuItem has been selected by the user and can no longer be cancelled.",
"type": "string"
}
},
"type": "object"
},
"Notification": {
"description": "A notification delivered by the API.",
"id": "Notification",
"properties": {
"collection": {
"description": "The collection that generated the notification.",
"type": "string"
},
"itemId": {
"description": "The ID of the item that generated the notification.",
"type": "string"
},
"operation": {
"description": "The type of operation that generated the notification.",
"type": "string"
},
"userActions": {
"description": "A list of actions taken by the user that triggered the notification.",
"items": {
"$ref": "UserAction"
},
"type": "array"
},
"userToken": {
"description": "The user token provided by the service when it subscribed for notifications.",
"type": "string"
},
"verifyToken": {
"description": "The secret verify token provided by the service when it subscribed for notifications.",
"type": "string"
}
},
"type": "object"
},
"NotificationConfig": {
"description": "Controls how notifications for a timeline item are presented to the user.",
"id": "NotificationConfig",
"properties": {
"deliveryTime": {
"description": "The time at which the notification should be delivered.",
"format": "date-time",
"type": "string"
},
"level": {
"description": "Describes how important the notification is. Allowed values are: \n- DEFAULT - Notifications of default importance. A chime will be played to alert users.",
"type": "string"
}
},
"type": "object"
},
"Setting": {
"description": "A setting for Glass.",
"id": "Setting",
"properties": {
"id": {
"description": "The setting's ID. The following IDs are valid: \n- locale - The key to the user’s language/locale (BCP 47 identifier) that Glassware should use to render localized content. \n- timezone - The key to the user’s current time zone region as defined in the tz database. Example: America/Los_Angeles.",
"type": "string"
},
"kind": {
"default": "mirror#setting",
"description": "The type of resource. This is always mirror#setting.",
"type": "string"
},
"value": {
"description": "The setting value, as a string.",
"type": "string"
}
},
"type": "object"
},
"Subscription": {
"description": "A subscription to events on a collection.",
"id": "Subscription",
"properties": {
"callbackUrl": {
"annotations": {
"required": [
"mirror.subscriptions.insert",
"mirror.subscriptions.update"
]
},
"description": "The URL where notifications should be delivered (must start with https://).",
"type": "string"
},
"collection": {
"annotations": {
"required": [
"mirror.subscriptions.insert",
"mirror.subscriptions.update"
]
},
"description": "The collection to subscribe to. Allowed values are: \n- timeline - Changes in the timeline including insertion, deletion, and updates. \n- locations - Location updates. \n- settings - Settings updates.",
"type": "string"
},
"id": {
"description": "The ID of the subscription.",
"type": "string"
},
"kind": {
"default": "mirror#subscription",
"description": "The type of resource. This is always mirror#subscription.",
"type": "string"
},
"notification": {
"$ref": "Notification",
"description": "Container object for notifications. This is not populated in the Subscription resource."
},
"operation": {
"description": "A list of operations that should be subscribed to. An empty list indicates that all operations on the collection should be subscribed to. Allowed values are: \n- UPDATE - The item has been updated. \n- INSERT - A new item has been inserted. \n- DELETE - The item has been deleted. \n- MENU_ACTION - A custom menu item has been triggered by the user.",
"items": {
"type": "string"
},
"type": "array"
},
"updated": {
"description": "The time at which this subscription was last modified, formatted according to RFC 3339.",
"format": "date-time",
"type": "string"
},
"userToken": {
"description": "An opaque token sent to the subscriber in notifications so that it can determine the ID of the user.",
"type": "string"
},
"verifyToken": {
"description": "A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google.",
"type": "string"
}
},
"type": "object"
},
"SubscriptionsListResponse": {
"description": "A list of Subscriptions. This is the response from the server to GET requests on the subscription collection.",
"id": "SubscriptionsListResponse",
"properties": {
"items": {
"description": "The list of subscriptions.",
"items": {
"$ref": "Subscription"
},
"type": "array"
},
"kind": {
"default": "mirror#subscriptionsList",
"description": "The type of resource. This is always mirror#subscriptionsList.",
"type": "string"
}
},
"type": "object"
},
"TimelineItem": {
"description": "Each item in the user's timeline is represented as a TimelineItem JSON structure, described below.",
"id": "TimelineItem",
"properties": {
"attachments": {
"description": "A list of media attachments associated with this item. As a convenience, you can refer to attachments in your HTML payloads with the attachment or cid scheme. For example: \n- attachment: \u003cimg src=\"attachment:attachment_index\"\u003e where attachment_index is the 0-based index of this array. \n- cid: \u003cimg src=\"cid:attachment_id\"\u003e where attachment_id is the ID of the attachment.",
"items": {
"$ref": "Attachment"
},
"type": "array"
},
"bundleId": {
"description": "The bundle ID for this item. Services can specify a bundleId to group many items together. They appear under a single top-level item on the device.",
"type": "string"
},
"canonicalUrl": {
"description": "A canonical URL pointing to the canonical/high quality version of the data represented by the timeline item.",
"type": "string"
},
"created": {
"description": "The time at which this item was created, formatted according to RFC 3339.",
"format": "date-time",
"type": "string"
},
"creator": {
"$ref": "Contact",
"description": "The user or group that created this item."
},
"displayTime": {
"description": "The time that should be displayed when this item is viewed in the timeline, formatted according to RFC 3339. This user's timeline is sorted chronologically on display time, so this will also determine where the item is displayed in the timeline. If not set by the service, the display time defaults to the updated time.",
"format": "date-time",
"type": "string"
},
"etag": {
"description": "ETag for this item.",
"type": "string"
},
"html": {
"description": "HTML content for this item. If both text and html are provided for an item, the html will be rendered in the timeline.\nAllowed HTML elements - You can use these elements in your timeline cards.\n \n- Headers: h1, h2, h3, h4, h5, h6 \n- Images: img \n- Lists: li, ol, ul \n- HTML5 semantics: article, aside, details, figure, figcaption, footer, header, nav, section, summary, time \n- Structural: blockquote, br, div, hr, p, span \n- Style: b, big, center, em, i, u, s, small, strike, strong, style, sub, sup \n- Tables: table, tbody, td, tfoot, th, thead, tr \nBlocked HTML elements: These elements and their contents are removed from HTML payloads.\n \n- Document headers: head, title \n- Embeds: audio, embed, object, source, video \n- Frames: frame, frameset \n- Scripting: applet, script \nOther elements: Any elements that aren't listed are removed, but their contents are preserved.",
"type": "string"
},
"id": {
"description": "The ID of the timeline item. This is unique within a user's timeline.",
"type": "string"
},
"inReplyTo": {
"description": "If this item was generated as a reply to another item, this field will be set to the ID of the item being replied to. This can be used to attach a reply to the appropriate conversation or post.",
"type": "string"
},
"isBundleCover": {
"description": "Whether this item is a bundle cover.\n\nIf an item is marked as a bundle cover, it will be the entry point to the bundle of items that have the same bundleId as that item. It will be shown only on the main timeline — not within the opened bundle.\n\nOn the main timeline, items that are shown are: \n- Items that have isBundleCover set to true \n- Items that do not have a bundleId In a bundle sub-timeline, items that are shown are: \n- Items that have the bundleId in question AND isBundleCover set to false",
"type": "boolean"
},
"isDeleted": {
"description": "When true, indicates this item is deleted, and only the ID property is set.",
"type": "boolean"
},
"isPinned": {
"description": "When true, indicates this item is pinned, which means it's grouped alongside \"active\" items like navigation and hangouts, on the opposite side of the home screen from historical (non-pinned) timeline items. You can allow the user to toggle the value of this property with the TOGGLE_PINNED built-in menu item.",
"type": "boolean"
},
"kind": {
"default": "mirror#timelineItem",
"description": "The type of resource. This is always mirror#timelineItem.",
"type": "string"
},
"location": {
"$ref": "Location",
"description": "The geographic location associated with this item."
},
"menuItems": {
"description": "A list of menu items that will be presented to the user when this item is selected in the timeline.",
"items": {
"$ref": "MenuItem"
},
"type": "array"
},
"notification": {
"$ref": "NotificationConfig",
"description": "Controls how notifications for this item are presented on the device. If this is missing, no notification will be generated."
},
"pinScore": {
"description": "For pinned items, this determines the order in which the item is displayed in the timeline, with a higher score appearing closer to the clock. Note: setting this field is currently not supported.",
"format": "int32",
"type": "integer"
},
"recipients": {
"description": "A list of users or groups that this item has been shared with.",
"items": {
"$ref": "Contact"
},
"type": "array"
},
"selfLink": {
"description": "A URL that can be used to retrieve this item.",
"type": "string"
},
"sourceItemId": {
"description": "Opaque string you can use to map a timeline item to data in your own service.",
"type": "string"
},
"speakableText": {
"description": "The speakable version of the content of this item. Along with the READ_ALOUD menu item, use this field to provide text that would be clearer when read aloud, or to provide extended information to what is displayed visually on Glass.\n\nGlassware should also specify the speakableType field, which will be spoken before this text in cases where the additional context is useful, for example when the user requests that the item be read aloud following a notification.",
"type": "string"
},
"speakableType": {
"description": "A speakable description of the type of this item. This will be announced to the user prior to reading the content of the item in cases where the additional context is useful, for example when the user requests that the item be read aloud following a notification.\n\nThis should be a short, simple noun phrase such as \"Email\", \"Text message\", or \"Daily Planet News Update\".\n\nGlassware are encouraged to populate this field for every timeline item, even if the item does not contain speakableText or text so that the user can learn the type of the item without looking at the screen.",
"type": "string"
},
"text": {
"description": "Text content of this item.",
"type": "string"
},
"title": {
"description": "The title of this item.",
"type": "string"
},
"updated": {
"description": "The time at which this item was last modified, formatted according to RFC 3339.",
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"TimelineListResponse": {
"description": "A list of timeline items. This is the response from the server to GET requests on the timeline collection.",
"id": "TimelineListResponse",
"properties": {
"items": {
"description": "Items in the timeline.",
"items": {
"$ref": "TimelineItem"
},
"type": "array"
},
"kind": {
"default": "mirror#timeline",
"description": "The type of resource. This is always mirror#timeline.",
"type": "string"
},
"nextPageToken": {
"description": "The next page token. Provide this as the pageToken parameter in the request to retrieve the next page of results.",
"type": "string"
}
},
"type": "object"
},
"UserAction": {
"description": "Represents an action taken by the user that triggered a notification.",
"id": "UserAction",
"properties": {
"payload": {
"description": "An optional payload for the action.\n\nFor actions of type CUSTOM, this is the ID of the custom menu item that was selected.",
"type": "string"
},
"type": {
"description": "The type of action. The value of this can be: \n- SHARE - the user shared an item. \n- REPLY - the user replied to an item. \n- REPLY_ALL - the user replied to all recipients of an item. \n- CUSTOM - the user selected a custom menu item on the timeline item. \n- DELETE - the user deleted the item. \n- PIN - the user pinned the item. \n- UNPIN - the user unpinned the item. \n- LAUNCH - the user initiated a voice command. In the future, additional types may be added. UserActions with unrecognized types should be ignored.",
"type": "string"
}
},
"type": "object"
},
"UserData": {
"id": "UserData",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"servicePath": "mirror/v1/",
"title": "Google Mirror API",
"version": "v1"
}