Documentation ¶
Overview ¶
Package mirror provides access to the Google Mirror API.
See https://developers.google.com/glass
Usage example:
import "code.google.com/p/google-api-go-client/mirror/v1" ... mirrorService, err := mirror.New(oauthHttpClient)
Index ¶
- Constants
- type Account
- type AccountsInsertCall
- type AccountsService
- type Attachment
- type AttachmentsListResponse
- type AuthToken
- type Command
- type Contact
- type ContactsDeleteCall
- type ContactsGetCall
- type ContactsInsertCall
- type ContactsListCall
- type ContactsListResponse
- type ContactsPatchCall
- type ContactsService
- func (r *ContactsService) Delete(id string) *ContactsDeleteCall
- func (r *ContactsService) Get(id string) *ContactsGetCall
- func (r *ContactsService) Insert(contact *Contact) *ContactsInsertCall
- func (r *ContactsService) List() *ContactsListCall
- func (r *ContactsService) Patch(id string, contact *Contact) *ContactsPatchCall
- func (r *ContactsService) Update(id string, contact *Contact) *ContactsUpdateCall
- type ContactsUpdateCall
- type Location
- type LocationsGetCall
- type LocationsListCall
- type LocationsListResponse
- type LocationsService
- type MenuItem
- type MenuValue
- type Notification
- type NotificationConfig
- type Service
- type Setting
- type SettingsGetCall
- type SettingsService
- type Subscription
- type SubscriptionsDeleteCall
- type SubscriptionsInsertCall
- type SubscriptionsListCall
- type SubscriptionsListResponse
- type SubscriptionsService
- func (r *SubscriptionsService) Delete(id string) *SubscriptionsDeleteCall
- func (r *SubscriptionsService) Insert(subscription *Subscription) *SubscriptionsInsertCall
- func (r *SubscriptionsService) List() *SubscriptionsListCall
- func (r *SubscriptionsService) Update(id string, subscription *Subscription) *SubscriptionsUpdateCall
- type SubscriptionsUpdateCall
- type TimelineAttachmentsDeleteCall
- type TimelineAttachmentsGetCall
- type TimelineAttachmentsInsertCall
- type TimelineAttachmentsListCall
- type TimelineAttachmentsService
- func (r *TimelineAttachmentsService) Delete(itemId string, attachmentId string) *TimelineAttachmentsDeleteCall
- func (r *TimelineAttachmentsService) Get(itemId string, attachmentId string) *TimelineAttachmentsGetCall
- func (r *TimelineAttachmentsService) Insert(itemId string) *TimelineAttachmentsInsertCall
- func (r *TimelineAttachmentsService) List(itemId string) *TimelineAttachmentsListCall
- type TimelineDeleteCall
- type TimelineGetCall
- type TimelineInsertCall
- type TimelineItem
- type TimelineListCall
- func (c *TimelineListCall) BundleId(bundleId string) *TimelineListCall
- func (c *TimelineListCall) Do() (*TimelineListResponse, error)
- func (c *TimelineListCall) Fields(s ...googleapi.Field) *TimelineListCall
- func (c *TimelineListCall) IncludeDeleted(includeDeleted bool) *TimelineListCall
- func (c *TimelineListCall) MaxResults(maxResults int64) *TimelineListCall
- func (c *TimelineListCall) OrderBy(orderBy string) *TimelineListCall
- func (c *TimelineListCall) PageToken(pageToken string) *TimelineListCall
- func (c *TimelineListCall) PinnedOnly(pinnedOnly bool) *TimelineListCall
- func (c *TimelineListCall) SourceItemId(sourceItemId string) *TimelineListCall
- type TimelineListResponse
- type TimelinePatchCall
- type TimelineService
- func (r *TimelineService) Delete(id string) *TimelineDeleteCall
- func (r *TimelineService) Get(id string) *TimelineGetCall
- func (r *TimelineService) Insert(timelineitem *TimelineItem) *TimelineInsertCall
- func (r *TimelineService) List() *TimelineListCall
- func (r *TimelineService) Patch(id string, timelineitem *TimelineItem) *TimelinePatchCall
- func (r *TimelineService) Update(id string, timelineitem *TimelineItem) *TimelineUpdateCall
- type TimelineUpdateCall
- type UserAction
- type UserData
Constants ¶
const ( // View your location GlassLocationScope = "https://www.googleapis.com/auth/glass.location" // View and manage your Glass timeline GlassTimelineScope = "https://www.googleapis.com/auth/glass.timeline" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsInsertCall ¶
type AccountsInsertCall struct {
// contains filtered or unexported fields
}
func (*AccountsInsertCall) Do ¶
func (c *AccountsInsertCall) Do() (*Account, error)
func (*AccountsInsertCall) Fields ¶
func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type AccountsService ¶
type AccountsService struct {
// contains filtered or unexported fields
}
func NewAccountsService ¶
func NewAccountsService(s *Service) *AccountsService
func (*AccountsService) Insert ¶
func (r *AccountsService) Insert(userToken string, accountType string, accountName string, account *Account) *AccountsInsertCall
Insert: Inserts a new account for a user
type Attachment ¶
type Attachment struct { // ContentType: The MIME type of the attachment. ContentType string `json:"contentType,omitempty"` // ContentUrl: The URL for the content. ContentUrl string `json:"contentUrl,omitempty"` // Id: The ID of the attachment. Id string `json:"id,omitempty"` // IsProcessingContent: 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. IsProcessingContent bool `json:"isProcessingContent,omitempty"` }
type AttachmentsListResponse ¶
type AttachmentsListResponse struct { // Items: The list of attachments. Items []*Attachment `json:"items,omitempty"` // Kind: The type of resource. This is always mirror#attachmentsList. Kind string `json:"kind,omitempty"` }
type Command ¶
type Command struct { // Type: The type of operation this command corresponds to. Allowed // values are: // - TAKE_A_NOTE - Shares a timeline item with the // transcription of user speech from the "Take a note" voice menu // command. // - POST_AN_UPDATE - Shares a timeline item with the // transcription of user speech from the "Post an update" voice menu // command. Type string `json:"type,omitempty"` }
type Contact ¶
type Contact struct { // AcceptCommands: 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. AcceptCommands []*Command `json:"acceptCommands,omitempty"` // AcceptTypes: 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. AcceptTypes []string `json:"acceptTypes,omitempty"` // DisplayName: The name to display for this contact. DisplayName string `json:"displayName,omitempty"` // Id: An ID for this contact. This is generated by the application and // is treated as an opaque token. Id string `json:"id,omitempty"` // ImageUrls: 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. ImageUrls []string `json:"imageUrls,omitempty"` // Kind: The type of resource. This is always mirror#contact. Kind string `json:"kind,omitempty"` // PhoneNumber: Primary phone number for the contact. This can be a // fully-qualified number, with country calling code and area code, or a // local number. PhoneNumber string `json:"phoneNumber,omitempty"` // Priority: Priority for the contact to determine ordering in a list of // contacts. Contacts with higher priorities will be shown before ones // with lower priorities. Priority int64 `json:"priority,omitempty"` // SharingFeatures: A list of sharing features that a contact can // handle. Allowed values are: // - ADD_CAPTION SharingFeatures []string `json:"sharingFeatures,omitempty"` // Source: The ID of the application that created this contact. This is // populated by the API Source string `json:"source,omitempty"` // SpeakableName: 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. SpeakableName string `json:"speakableName,omitempty"` // Type: The type for this contact. This is used for sorting in UIs. // Allowed values are: // - INDIVIDUAL - Represents a single person. This // is the default. // - GROUP - Represents more than a single person. Type string `json:"type,omitempty"` }
type ContactsDeleteCall ¶
type ContactsDeleteCall struct {
// contains filtered or unexported fields
}
func (*ContactsDeleteCall) Do ¶
func (c *ContactsDeleteCall) Do() error
func (*ContactsDeleteCall) Fields ¶
func (c *ContactsDeleteCall) Fields(s ...googleapi.Field) *ContactsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ContactsGetCall ¶
type ContactsGetCall struct {
// contains filtered or unexported fields
}
func (*ContactsGetCall) Do ¶
func (c *ContactsGetCall) Do() (*Contact, error)
func (*ContactsGetCall) Fields ¶
func (c *ContactsGetCall) Fields(s ...googleapi.Field) *ContactsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ContactsInsertCall ¶
type ContactsInsertCall struct {
// contains filtered or unexported fields
}
func (*ContactsInsertCall) Do ¶
func (c *ContactsInsertCall) Do() (*Contact, error)
func (*ContactsInsertCall) Fields ¶
func (c *ContactsInsertCall) Fields(s ...googleapi.Field) *ContactsInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ContactsListCall ¶
type ContactsListCall struct {
// contains filtered or unexported fields
}
func (*ContactsListCall) Do ¶
func (c *ContactsListCall) Do() (*ContactsListResponse, error)
func (*ContactsListCall) Fields ¶
func (c *ContactsListCall) Fields(s ...googleapi.Field) *ContactsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ContactsListResponse ¶
type ContactsPatchCall ¶
type ContactsPatchCall struct {
// contains filtered or unexported fields
}
func (*ContactsPatchCall) Do ¶
func (c *ContactsPatchCall) Do() (*Contact, error)
func (*ContactsPatchCall) Fields ¶
func (c *ContactsPatchCall) Fields(s ...googleapi.Field) *ContactsPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ContactsService ¶
type ContactsService struct {
// contains filtered or unexported fields
}
func NewContactsService ¶
func NewContactsService(s *Service) *ContactsService
func (*ContactsService) Delete ¶
func (r *ContactsService) Delete(id string) *ContactsDeleteCall
Delete: Deletes a contact.
func (*ContactsService) Get ¶
func (r *ContactsService) Get(id string) *ContactsGetCall
Get: Gets a single contact by ID.
func (*ContactsService) Insert ¶
func (r *ContactsService) Insert(contact *Contact) *ContactsInsertCall
Insert: Inserts a new contact.
func (*ContactsService) List ¶
func (r *ContactsService) List() *ContactsListCall
List: Retrieves a list of contacts for the authenticated user.
func (*ContactsService) Patch ¶
func (r *ContactsService) Patch(id string, contact *Contact) *ContactsPatchCall
Patch: Updates a contact in place. This method supports patch semantics.
func (*ContactsService) Update ¶
func (r *ContactsService) Update(id string, contact *Contact) *ContactsUpdateCall
Update: Updates a contact in place.
type ContactsUpdateCall ¶
type ContactsUpdateCall struct {
// contains filtered or unexported fields
}
func (*ContactsUpdateCall) Do ¶
func (c *ContactsUpdateCall) Do() (*Contact, error)
func (*ContactsUpdateCall) Fields ¶
func (c *ContactsUpdateCall) Fields(s ...googleapi.Field) *ContactsUpdateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type Location ¶
type Location struct { // Accuracy: The accuracy of the location fix in meters. Accuracy float64 `json:"accuracy,omitempty"` // Address: The full address of the location. Address string `json:"address,omitempty"` // DisplayName: The name to be displayed. This may be a business name or // a user-defined place, such as "Home". DisplayName string `json:"displayName,omitempty"` // Id: The ID of the location. Id string `json:"id,omitempty"` // Kind: The type of resource. This is always mirror#location. Kind string `json:"kind,omitempty"` // Latitude: The latitude, in degrees. Latitude float64 `json:"latitude,omitempty"` // Longitude: The longitude, in degrees. Longitude float64 `json:"longitude,omitempty"` // Timestamp: The time at which this location was captured, formatted // according to RFC 3339. Timestamp string `json:"timestamp,omitempty"` }
type LocationsGetCall ¶
type LocationsGetCall struct {
// contains filtered or unexported fields
}
func (*LocationsGetCall) Do ¶
func (c *LocationsGetCall) Do() (*Location, error)
func (*LocationsGetCall) Fields ¶
func (c *LocationsGetCall) Fields(s ...googleapi.Field) *LocationsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type LocationsListCall ¶
type LocationsListCall struct {
// contains filtered or unexported fields
}
func (*LocationsListCall) Do ¶
func (c *LocationsListCall) Do() (*LocationsListResponse, error)
func (*LocationsListCall) Fields ¶
func (c *LocationsListCall) Fields(s ...googleapi.Field) *LocationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type LocationsListResponse ¶
type LocationsService ¶
type LocationsService struct {
// contains filtered or unexported fields
}
func NewLocationsService ¶
func NewLocationsService(s *Service) *LocationsService
func (*LocationsService) Get ¶
func (r *LocationsService) Get(id string) *LocationsGetCall
Get: Gets a single location by ID.
func (*LocationsService) List ¶
func (r *LocationsService) List() *LocationsListCall
List: Retrieves a list of locations for the user.
type MenuItem ¶
type MenuItem struct { // Action: Controls the behavior when the user picks the menu option. // Allowed values are: // - 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. // - Built-in actions: // - 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. // - // REPLY_ALL - Same behavior as REPLY. The original timeline item's // recipients will be added to the reply item. // - DELETE - Delete the // timeline item. // - SHARE - Share the timeline item with the available // contacts. // - 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. // - 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. // - VOICE_CALL - Initiate a phone call // using the timeline item's creator.phoneNumber attribute as recipient. // // - NAVIGATE - Navigate to the timeline item's location. // - // TOGGLE_PINNED - Toggle the isPinned state of the timeline item. // - // OPEN_URI - Open the payload of the menu item in the browser. // - // PLAY_VIDEO - Open the payload of the menu item in the Glass video // player. // - SEND_MESSAGE - Initiate sending a message to the timeline // item's creator: // - If the creator.phoneNumber is set and Glass is // connected to an Android phone, the message is an SMS. // - Otherwise, // if the creator.email is set, the message is an email. Action string `json:"action,omitempty"` // Contextual_command: 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. Contextual_command string `json:"contextual_command,omitempty"` // Id: The ID for this menu item. This is generated by the application // and is treated as an opaque token. Id string `json:"id,omitempty"` // Payload: A generic payload whose meaning changes depending on this // MenuItem's action. // - When the action is OPEN_URI, the payload is // the URL of the website to view. // - When the action is PLAY_VIDEO, the // payload is the streaming URL of the video // - When the action is // GET_MEDIA_INPUT, the payload is the text transcription of a user's // speech input Payload string `json:"payload,omitempty"` // RemoveWhenSelected: If set to true on a CUSTOM menu item, that item // will be removed from the menu after it is selected. RemoveWhenSelected bool `json:"removeWhenSelected,omitempty"` // Values: 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. Values []*MenuValue `json:"values,omitempty"` }
type MenuValue ¶
type MenuValue struct { // DisplayName: 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. DisplayName string `json:"displayName,omitempty"` // IconUrl: URL of an icon to display with the menu item. IconUrl string `json:"iconUrl,omitempty"` // State: The state that this value applies to. Allowed values are: // - // DEFAULT - Default value shown when displayed in the menuItems list. // // - PENDING - Value shown when the menuItem has been selected by the // user but can still be cancelled. // - CONFIRMED - Value shown when the // menuItem has been selected by the user and can no longer be // cancelled. State string `json:"state,omitempty"` }
type Notification ¶
type Notification struct { // Collection: The collection that generated the notification. Collection string `json:"collection,omitempty"` // ItemId: The ID of the item that generated the notification. ItemId string `json:"itemId,omitempty"` // Operation: The type of operation that generated the notification. Operation string `json:"operation,omitempty"` // UserActions: A list of actions taken by the user that triggered the // notification. UserActions []*UserAction `json:"userActions,omitempty"` // UserToken: The user token provided by the service when it subscribed // for notifications. UserToken string `json:"userToken,omitempty"` // VerifyToken: The secret verify token provided by the service when it // subscribed for notifications. VerifyToken string `json:"verifyToken,omitempty"` }
type NotificationConfig ¶
type NotificationConfig struct { // DeliveryTime: The time at which the notification should be delivered. DeliveryTime string `json:"deliveryTime,omitempty"` // Level: Describes how important the notification is. Allowed values // are: // - DEFAULT - Notifications of default importance. A chime will // be played to alert users. Level string `json:"level,omitempty"` }
type Service ¶
type Service struct { BasePath string // API endpoint base URL Accounts *AccountsService Contacts *ContactsService Locations *LocationsService Settings *SettingsService Subscriptions *SubscriptionsService Timeline *TimelineService // contains filtered or unexported fields }
type Setting ¶
type Setting struct { // Id: The setting's ID. The following IDs are valid: // - locale - The // key to the user’s language/locale (BCP 47 identifier) that // Glassware should use to render localized content. // - timezone - The // key to the user’s current time zone region as defined in the tz // database. Example: America/Los_Angeles. Id string `json:"id,omitempty"` // Kind: The type of resource. This is always mirror#setting. Kind string `json:"kind,omitempty"` // Value: The setting value, as a string. Value string `json:"value,omitempty"` }
type SettingsGetCall ¶
type SettingsGetCall struct {
// contains filtered or unexported fields
}
func (*SettingsGetCall) Do ¶
func (c *SettingsGetCall) Do() (*Setting, error)
func (*SettingsGetCall) Fields ¶
func (c *SettingsGetCall) Fields(s ...googleapi.Field) *SettingsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type SettingsService ¶
type SettingsService struct {
// contains filtered or unexported fields
}
func NewSettingsService ¶
func NewSettingsService(s *Service) *SettingsService
func (*SettingsService) Get ¶
func (r *SettingsService) Get(id string) *SettingsGetCall
Get: Gets a single setting by ID.
type Subscription ¶
type Subscription struct { // CallbackUrl: The URL where notifications should be delivered (must // start with https://). CallbackUrl string `json:"callbackUrl,omitempty"` // Collection: The collection to subscribe to. Allowed values are: // - // timeline - Changes in the timeline including insertion, deletion, and // updates. // - locations - Location updates. // - settings - Settings // updates. Collection string `json:"collection,omitempty"` // Id: The ID of the subscription. Id string `json:"id,omitempty"` // Kind: The type of resource. This is always mirror#subscription. Kind string `json:"kind,omitempty"` // Notification: Container object for notifications. This is not // populated in the Subscription resource. Notification *Notification `json:"notification,omitempty"` // Operation: 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: // - UPDATE - The item has been // updated. // - INSERT - A new item has been inserted. // - DELETE - The // item has been deleted. // - MENU_ACTION - A custom menu item has been // triggered by the user. Operation []string `json:"operation,omitempty"` // Updated: The time at which this subscription was last modified, // formatted according to RFC 3339. Updated string `json:"updated,omitempty"` // UserToken: An opaque token sent to the subscriber in notifications so // that it can determine the ID of the user. UserToken string `json:"userToken,omitempty"` // VerifyToken: A secret token sent to the subscriber in notifications // so that it can verify that the notification was generated by Google. VerifyToken string `json:"verifyToken,omitempty"` }
type SubscriptionsDeleteCall ¶
type SubscriptionsDeleteCall struct {
// contains filtered or unexported fields
}
func (*SubscriptionsDeleteCall) Do ¶
func (c *SubscriptionsDeleteCall) Do() error
func (*SubscriptionsDeleteCall) Fields ¶
func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type SubscriptionsInsertCall ¶
type SubscriptionsInsertCall struct {
// contains filtered or unexported fields
}
func (*SubscriptionsInsertCall) Do ¶
func (c *SubscriptionsInsertCall) Do() (*Subscription, error)
func (*SubscriptionsInsertCall) Fields ¶
func (c *SubscriptionsInsertCall) Fields(s ...googleapi.Field) *SubscriptionsInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type SubscriptionsListCall ¶
type SubscriptionsListCall struct {
// contains filtered or unexported fields
}
func (*SubscriptionsListCall) Do ¶
func (c *SubscriptionsListCall) Do() (*SubscriptionsListResponse, error)
func (*SubscriptionsListCall) Fields ¶
func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type SubscriptionsListResponse ¶
type SubscriptionsListResponse struct { // Items: The list of subscriptions. Items []*Subscription `json:"items,omitempty"` // Kind: The type of resource. This is always mirror#subscriptionsList. Kind string `json:"kind,omitempty"` }
type SubscriptionsService ¶
type SubscriptionsService struct {
// contains filtered or unexported fields
}
func NewSubscriptionsService ¶
func NewSubscriptionsService(s *Service) *SubscriptionsService
func (*SubscriptionsService) Delete ¶
func (r *SubscriptionsService) Delete(id string) *SubscriptionsDeleteCall
Delete: Deletes a subscription.
func (*SubscriptionsService) Insert ¶
func (r *SubscriptionsService) Insert(subscription *Subscription) *SubscriptionsInsertCall
Insert: Creates a new subscription.
func (*SubscriptionsService) List ¶
func (r *SubscriptionsService) List() *SubscriptionsListCall
List: Retrieves a list of subscriptions for the authenticated user and service.
func (*SubscriptionsService) Update ¶
func (r *SubscriptionsService) Update(id string, subscription *Subscription) *SubscriptionsUpdateCall
Update: Updates an existing subscription in place.
type SubscriptionsUpdateCall ¶
type SubscriptionsUpdateCall struct {
// contains filtered or unexported fields
}
func (*SubscriptionsUpdateCall) Do ¶
func (c *SubscriptionsUpdateCall) Do() (*Subscription, error)
func (*SubscriptionsUpdateCall) Fields ¶
func (c *SubscriptionsUpdateCall) Fields(s ...googleapi.Field) *SubscriptionsUpdateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TimelineAttachmentsDeleteCall ¶
type TimelineAttachmentsDeleteCall struct {
// contains filtered or unexported fields
}
func (*TimelineAttachmentsDeleteCall) Do ¶
func (c *TimelineAttachmentsDeleteCall) Do() error
func (*TimelineAttachmentsDeleteCall) Fields ¶
func (c *TimelineAttachmentsDeleteCall) Fields(s ...googleapi.Field) *TimelineAttachmentsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TimelineAttachmentsGetCall ¶
type TimelineAttachmentsGetCall struct {
// contains filtered or unexported fields
}
func (*TimelineAttachmentsGetCall) Do ¶
func (c *TimelineAttachmentsGetCall) Do() (*Attachment, error)
func (*TimelineAttachmentsGetCall) Fields ¶
func (c *TimelineAttachmentsGetCall) Fields(s ...googleapi.Field) *TimelineAttachmentsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TimelineAttachmentsInsertCall ¶
type TimelineAttachmentsInsertCall struct {
// contains filtered or unexported fields
}
func (*TimelineAttachmentsInsertCall) Do ¶
func (c *TimelineAttachmentsInsertCall) Do() (*Attachment, error)
func (*TimelineAttachmentsInsertCall) Fields ¶
func (c *TimelineAttachmentsInsertCall) Fields(s ...googleapi.Field) *TimelineAttachmentsInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*TimelineAttachmentsInsertCall) Media ¶
func (c *TimelineAttachmentsInsertCall) Media(r io.Reader) *TimelineAttachmentsInsertCall
type TimelineAttachmentsListCall ¶
type TimelineAttachmentsListCall struct {
// contains filtered or unexported fields
}
func (*TimelineAttachmentsListCall) Do ¶
func (c *TimelineAttachmentsListCall) Do() (*AttachmentsListResponse, error)
func (*TimelineAttachmentsListCall) Fields ¶
func (c *TimelineAttachmentsListCall) Fields(s ...googleapi.Field) *TimelineAttachmentsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TimelineAttachmentsService ¶
type TimelineAttachmentsService struct {
// contains filtered or unexported fields
}
func NewTimelineAttachmentsService ¶
func NewTimelineAttachmentsService(s *Service) *TimelineAttachmentsService
func (*TimelineAttachmentsService) Delete ¶
func (r *TimelineAttachmentsService) Delete(itemId string, attachmentId string) *TimelineAttachmentsDeleteCall
Delete: Deletes an attachment from a timeline item.
func (*TimelineAttachmentsService) Get ¶
func (r *TimelineAttachmentsService) Get(itemId string, attachmentId string) *TimelineAttachmentsGetCall
Get: Retrieves an attachment on a timeline item by item ID and attachment ID.
func (*TimelineAttachmentsService) Insert ¶
func (r *TimelineAttachmentsService) Insert(itemId string) *TimelineAttachmentsInsertCall
Insert: Adds a new attachment to a timeline item.
func (*TimelineAttachmentsService) List ¶
func (r *TimelineAttachmentsService) List(itemId string) *TimelineAttachmentsListCall
List: Returns a list of attachments for a timeline item.
type TimelineDeleteCall ¶
type TimelineDeleteCall struct {
// contains filtered or unexported fields
}
func (*TimelineDeleteCall) Do ¶
func (c *TimelineDeleteCall) Do() error
func (*TimelineDeleteCall) Fields ¶
func (c *TimelineDeleteCall) Fields(s ...googleapi.Field) *TimelineDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TimelineGetCall ¶
type TimelineGetCall struct {
// contains filtered or unexported fields
}
func (*TimelineGetCall) Do ¶
func (c *TimelineGetCall) Do() (*TimelineItem, error)
func (*TimelineGetCall) Fields ¶
func (c *TimelineGetCall) Fields(s ...googleapi.Field) *TimelineGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TimelineInsertCall ¶
type TimelineInsertCall struct {
// contains filtered or unexported fields
}
func (*TimelineInsertCall) Do ¶
func (c *TimelineInsertCall) Do() (*TimelineItem, error)
func (*TimelineInsertCall) Fields ¶
func (c *TimelineInsertCall) Fields(s ...googleapi.Field) *TimelineInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*TimelineInsertCall) Media ¶
func (c *TimelineInsertCall) Media(r io.Reader) *TimelineInsertCall
type TimelineItem ¶
type TimelineItem struct { // Attachments: 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: // - attachment: <img // src="attachment:attachment_index"> where attachment_index is the // 0-based index of this array. // - cid: <img src="cid:attachment_id"> // where attachment_id is the ID of the attachment. Attachments []*Attachment `json:"attachments,omitempty"` // BundleId: 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. BundleId string `json:"bundleId,omitempty"` // CanonicalUrl: A canonical URL pointing to the canonical/high quality // version of the data represented by the timeline item. CanonicalUrl string `json:"canonicalUrl,omitempty"` // Created: The time at which this item was created, formatted according // to RFC 3339. Created string `json:"created,omitempty"` // Creator: The user or group that created this item. Creator *Contact `json:"creator,omitempty"` // DisplayTime: 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. DisplayTime string `json:"displayTime,omitempty"` // Etag: ETag for this item. Etag string `json:"etag,omitempty"` // Html: HTML content for this item. If both text and html are provided // for an item, the html will be rendered in the timeline. // Allowed HTML // elements - You can use these elements in your timeline cards. // // - // Headers: h1, h2, h3, h4, h5, h6 // - Images: img // - Lists: li, ol, ul // // - HTML5 semantics: article, aside, details, figure, figcaption, // footer, header, nav, section, summary, time // - Structural: // blockquote, br, div, hr, p, span // - Style: b, big, center, em, i, u, // s, small, strike, strong, style, sub, sup // - Tables: table, tbody, // td, tfoot, th, thead, tr // Blocked HTML elements: These elements and // their contents are removed from HTML payloads. // // - Document headers: // head, title // - Embeds: audio, embed, object, source, video // - Frames: // frame, frameset // - Scripting: applet, script // Other elements: Any // elements that aren't listed are removed, but their contents are // preserved. Html string `json:"html,omitempty"` // Id: The ID of the timeline item. This is unique within a user's // timeline. Id string `json:"id,omitempty"` // InReplyTo: 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. InReplyTo string `json:"inReplyTo,omitempty"` // IsBundleCover: Whether this item is a bundle cover. // // If 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. // // On the main // timeline, items that are shown are: // - Items that have isBundleCover // set to true // - Items that do not have a bundleId In a bundle // sub-timeline, items that are shown are: // - Items that have the // bundleId in question AND isBundleCover set to false IsBundleCover bool `json:"isBundleCover,omitempty"` // IsDeleted: When true, indicates this item is deleted, and only the ID // property is set. IsDeleted bool `json:"isDeleted,omitempty"` // IsPinned: 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. IsPinned bool `json:"isPinned,omitempty"` // Kind: The type of resource. This is always mirror#timelineItem. Kind string `json:"kind,omitempty"` // Location: The geographic location associated with this item. Location *Location `json:"location,omitempty"` // MenuItems: A list of menu items that will be presented to the user // when this item is selected in the timeline. MenuItems []*MenuItem `json:"menuItems,omitempty"` // Notification: Controls how notifications for this item are presented // on the device. If this is missing, no notification will be generated. Notification *NotificationConfig `json:"notification,omitempty"` // PinScore: 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. PinScore int64 `json:"pinScore,omitempty"` // Recipients: A list of users or groups that this item has been shared // with. Recipients []*Contact `json:"recipients,omitempty"` // SelfLink: A URL that can be used to retrieve this item. SelfLink string `json:"selfLink,omitempty"` // SourceItemId: Opaque string you can use to map a timeline item to // data in your own service. SourceItemId string `json:"sourceItemId,omitempty"` // SpeakableText: 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. // // Glassware 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. SpeakableText string `json:"speakableText,omitempty"` // SpeakableType: 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. // // This should be a short, simple noun phrase such as // "Email", "Text message", or "Daily Planet News Update". // // Glassware // 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. SpeakableType string `json:"speakableType,omitempty"` // Text: Text content of this item. Text string `json:"text,omitempty"` // Title: The title of this item. Title string `json:"title,omitempty"` // Updated: The time at which this item was last modified, formatted // according to RFC 3339. Updated string `json:"updated,omitempty"` }
type TimelineListCall ¶
type TimelineListCall struct {
// contains filtered or unexported fields
}
func (*TimelineListCall) BundleId ¶
func (c *TimelineListCall) BundleId(bundleId string) *TimelineListCall
BundleId sets the optional parameter "bundleId": If provided, only items with the given bundleId will be returned.
func (*TimelineListCall) Do ¶
func (c *TimelineListCall) Do() (*TimelineListResponse, error)
func (*TimelineListCall) Fields ¶
func (c *TimelineListCall) Fields(s ...googleapi.Field) *TimelineListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*TimelineListCall) IncludeDeleted ¶
func (c *TimelineListCall) IncludeDeleted(includeDeleted bool) *TimelineListCall
IncludeDeleted sets the optional parameter "includeDeleted": If true, tombstone records for deleted items will be returned.
func (*TimelineListCall) MaxResults ¶
func (c *TimelineListCall) MaxResults(maxResults int64) *TimelineListCall
MaxResults sets the optional parameter "maxResults": The maximum number of items to include in the response, used for paging.
func (*TimelineListCall) OrderBy ¶
func (c *TimelineListCall) OrderBy(orderBy string) *TimelineListCall
OrderBy sets the optional parameter "orderBy": Controls the order in which timeline items are returned.
func (*TimelineListCall) PageToken ¶
func (c *TimelineListCall) PageToken(pageToken string) *TimelineListCall
PageToken sets the optional parameter "pageToken": Token for the page of results to return.
func (*TimelineListCall) PinnedOnly ¶
func (c *TimelineListCall) PinnedOnly(pinnedOnly bool) *TimelineListCall
PinnedOnly sets the optional parameter "pinnedOnly": If true, only pinned items will be returned.
func (*TimelineListCall) SourceItemId ¶
func (c *TimelineListCall) SourceItemId(sourceItemId string) *TimelineListCall
SourceItemId sets the optional parameter "sourceItemId": If provided, only items with the given sourceItemId will be returned.
type TimelineListResponse ¶
type TimelineListResponse struct { // Items: Items in the timeline. Items []*TimelineItem `json:"items,omitempty"` // Kind: The type of resource. This is always mirror#timeline. Kind string `json:"kind,omitempty"` // NextPageToken: The next page token. Provide this as the pageToken // parameter in the request to retrieve the next page of results. NextPageToken string `json:"nextPageToken,omitempty"` }
type TimelinePatchCall ¶
type TimelinePatchCall struct {
// contains filtered or unexported fields
}
func (*TimelinePatchCall) Do ¶
func (c *TimelinePatchCall) Do() (*TimelineItem, error)
func (*TimelinePatchCall) Fields ¶
func (c *TimelinePatchCall) Fields(s ...googleapi.Field) *TimelinePatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TimelineService ¶
type TimelineService struct { Attachments *TimelineAttachmentsService // contains filtered or unexported fields }
func NewTimelineService ¶
func NewTimelineService(s *Service) *TimelineService
func (*TimelineService) Delete ¶
func (r *TimelineService) Delete(id string) *TimelineDeleteCall
Delete: Deletes a timeline item.
func (*TimelineService) Get ¶
func (r *TimelineService) Get(id string) *TimelineGetCall
Get: Gets a single timeline item by ID.
func (*TimelineService) Insert ¶
func (r *TimelineService) Insert(timelineitem *TimelineItem) *TimelineInsertCall
Insert: Inserts a new item into the timeline.
func (*TimelineService) List ¶
func (r *TimelineService) List() *TimelineListCall
List: Retrieves a list of timeline items for the authenticated user.
func (*TimelineService) Patch ¶
func (r *TimelineService) Patch(id string, timelineitem *TimelineItem) *TimelinePatchCall
Patch: Updates a timeline item in place. This method supports patch semantics.
func (*TimelineService) Update ¶
func (r *TimelineService) Update(id string, timelineitem *TimelineItem) *TimelineUpdateCall
Update: Updates a timeline item in place.
type TimelineUpdateCall ¶
type TimelineUpdateCall struct {
// contains filtered or unexported fields
}
func (*TimelineUpdateCall) Do ¶
func (c *TimelineUpdateCall) Do() (*TimelineItem, error)
func (*TimelineUpdateCall) Fields ¶
func (c *TimelineUpdateCall) Fields(s ...googleapi.Field) *TimelineUpdateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*TimelineUpdateCall) Media ¶
func (c *TimelineUpdateCall) Media(r io.Reader) *TimelineUpdateCall
type UserAction ¶
type UserAction struct { // Payload: An optional payload for the action. // // For actions of type // CUSTOM, this is the ID of the custom menu item that was selected. Payload string `json:"payload,omitempty"` // Type: The type of action. The value of this can be: // - SHARE - the // user shared an item. // - REPLY - the user replied to an item. // - // REPLY_ALL - the user replied to all recipients of an item. // - CUSTOM // - the user selected a custom menu item on the timeline item. // - // DELETE - the user deleted the item. // - PIN - the user pinned the // item. // - UNPIN - the user unpinned the item. // - LAUNCH - the user // initiated a voice command. In the future, additional types may be // added. UserActions with unrecognized types should be ignored. Type string `json:"type,omitempty"` }