mirror
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package mirror provides access to the Google Mirror API.
For product documentation, see:https://developers.google.com/glass
Creating a client¶
Usage example:
import "google.golang.org/api/mirror/v1"...ctx := context.Background()mirrorService, err := mirror.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication.
For information on how to create and obtain Application Default Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
mirrorService, err := mirror.NewService(ctx, option.WithScopes(mirror.GlassTimelineScope))
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
mirrorService, err := mirror.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)mirrorService, err := mirror.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seehttps://godoc.org/google.golang.org/api/option/ for details on options.
Index¶
- Constants
- type Account
- type AccountsInsertCall
- type AccountsService
- type Attachment
- type AttachmentsListResponse
- type AuthToken
- type Command
- type Contact
- type ContactsDeleteCall
- type ContactsGetCall
- func (c *ContactsGetCall) Context(ctx context.Context) *ContactsGetCall
- func (c *ContactsGetCall) Do(opts ...googleapi.CallOption) (*Contact, error)
- func (c *ContactsGetCall) Fields(s ...googleapi.Field) *ContactsGetCall
- func (c *ContactsGetCall) Header() http.Header
- func (c *ContactsGetCall) IfNoneMatch(entityTag string) *ContactsGetCall
- type ContactsInsertCall
- type ContactsListCall
- func (c *ContactsListCall) Context(ctx context.Context) *ContactsListCall
- func (c *ContactsListCall) Do(opts ...googleapi.CallOption) (*ContactsListResponse, error)
- func (c *ContactsListCall) Fields(s ...googleapi.Field) *ContactsListCall
- func (c *ContactsListCall) Header() http.Header
- func (c *ContactsListCall) IfNoneMatch(entityTag string) *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
- func (c *LocationsGetCall) Context(ctx context.Context) *LocationsGetCall
- func (c *LocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error)
- func (c *LocationsGetCall) Fields(s ...googleapi.Field) *LocationsGetCall
- func (c *LocationsGetCall) Header() http.Header
- func (c *LocationsGetCall) IfNoneMatch(entityTag string) *LocationsGetCall
- type LocationsListCall
- func (c *LocationsListCall) Context(ctx context.Context) *LocationsListCall
- func (c *LocationsListCall) Do(opts ...googleapi.CallOption) (*LocationsListResponse, error)
- func (c *LocationsListCall) Fields(s ...googleapi.Field) *LocationsListCall
- func (c *LocationsListCall) Header() http.Header
- func (c *LocationsListCall) IfNoneMatch(entityTag string) *LocationsListCall
- type LocationsListResponse
- type LocationsService
- type MenuItem
- type MenuValue
- type Notification
- type NotificationConfig
- type Service
- type Setting
- type SettingsGetCall
- func (c *SettingsGetCall) Context(ctx context.Context) *SettingsGetCall
- func (c *SettingsGetCall) Do(opts ...googleapi.CallOption) (*Setting, error)
- func (c *SettingsGetCall) Fields(s ...googleapi.Field) *SettingsGetCall
- func (c *SettingsGetCall) Header() http.Header
- func (c *SettingsGetCall) IfNoneMatch(entityTag string) *SettingsGetCall
- type SettingsService
- type Subscription
- type SubscriptionsDeleteCall
- func (c *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall
- func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) error
- func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall
- func (c *SubscriptionsDeleteCall) Header() http.Header
- type SubscriptionsInsertCall
- func (c *SubscriptionsInsertCall) Context(ctx context.Context) *SubscriptionsInsertCall
- func (c *SubscriptionsInsertCall) Do(opts ...googleapi.CallOption) (*Subscription, error)
- func (c *SubscriptionsInsertCall) Fields(s ...googleapi.Field) *SubscriptionsInsertCall
- func (c *SubscriptionsInsertCall) Header() http.Header
- type SubscriptionsListCall
- func (c *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall
- func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*SubscriptionsListResponse, error)
- func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall
- func (c *SubscriptionsListCall) Header() http.Header
- func (c *SubscriptionsListCall) IfNoneMatch(entityTag string) *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
- func (c *SubscriptionsUpdateCall) Context(ctx context.Context) *SubscriptionsUpdateCall
- func (c *SubscriptionsUpdateCall) Do(opts ...googleapi.CallOption) (*Subscription, error)
- func (c *SubscriptionsUpdateCall) Fields(s ...googleapi.Field) *SubscriptionsUpdateCall
- func (c *SubscriptionsUpdateCall) Header() http.Header
- type TimelineAttachmentsDeleteCall
- func (c *TimelineAttachmentsDeleteCall) Context(ctx context.Context) *TimelineAttachmentsDeleteCall
- func (c *TimelineAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) error
- func (c *TimelineAttachmentsDeleteCall) Fields(s ...googleapi.Field) *TimelineAttachmentsDeleteCall
- func (c *TimelineAttachmentsDeleteCall) Header() http.Header
- type TimelineAttachmentsGetCall
- func (c *TimelineAttachmentsGetCall) Context(ctx context.Context) *TimelineAttachmentsGetCall
- func (c *TimelineAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Attachment, error)
- func (c *TimelineAttachmentsGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error)
- func (c *TimelineAttachmentsGetCall) Fields(s ...googleapi.Field) *TimelineAttachmentsGetCall
- func (c *TimelineAttachmentsGetCall) Header() http.Header
- func (c *TimelineAttachmentsGetCall) IfNoneMatch(entityTag string) *TimelineAttachmentsGetCall
- type TimelineAttachmentsInsertCall
- func (c *TimelineAttachmentsInsertCall) Context(ctx context.Context) *TimelineAttachmentsInsertCall
- func (c *TimelineAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Attachment, error)
- func (c *TimelineAttachmentsInsertCall) Fields(s ...googleapi.Field) *TimelineAttachmentsInsertCall
- func (c *TimelineAttachmentsInsertCall) Header() http.Header
- func (c *TimelineAttachmentsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *TimelineAttachmentsInsertCall
- func (c *TimelineAttachmentsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TimelineAttachmentsInsertCall
- func (c *TimelineAttachmentsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TimelineAttachmentsInsertCalldeprecated
- type TimelineAttachmentsListCall
- func (c *TimelineAttachmentsListCall) Context(ctx context.Context) *TimelineAttachmentsListCall
- func (c *TimelineAttachmentsListCall) Do(opts ...googleapi.CallOption) (*AttachmentsListResponse, error)
- func (c *TimelineAttachmentsListCall) Fields(s ...googleapi.Field) *TimelineAttachmentsListCall
- func (c *TimelineAttachmentsListCall) Header() http.Header
- func (c *TimelineAttachmentsListCall) IfNoneMatch(entityTag string) *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
- func (c *TimelineGetCall) Context(ctx context.Context) *TimelineGetCall
- func (c *TimelineGetCall) Do(opts ...googleapi.CallOption) (*TimelineItem, error)
- func (c *TimelineGetCall) Fields(s ...googleapi.Field) *TimelineGetCall
- func (c *TimelineGetCall) Header() http.Header
- func (c *TimelineGetCall) IfNoneMatch(entityTag string) *TimelineGetCall
- type TimelineInsertCall
- func (c *TimelineInsertCall) Context(ctx context.Context) *TimelineInsertCall
- func (c *TimelineInsertCall) Do(opts ...googleapi.CallOption) (*TimelineItem, error)
- func (c *TimelineInsertCall) Fields(s ...googleapi.Field) *TimelineInsertCall
- func (c *TimelineInsertCall) Header() http.Header
- func (c *TimelineInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *TimelineInsertCall
- func (c *TimelineInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TimelineInsertCall
- func (c *TimelineInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TimelineInsertCalldeprecated
- type TimelineItem
- type TimelineListCall
- func (c *TimelineListCall) BundleId(bundleId string) *TimelineListCall
- func (c *TimelineListCall) Context(ctx context.Context) *TimelineListCall
- func (c *TimelineListCall) Do(opts ...googleapi.CallOption) (*TimelineListResponse, error)
- func (c *TimelineListCall) Fields(s ...googleapi.Field) *TimelineListCall
- func (c *TimelineListCall) Header() http.Header
- func (c *TimelineListCall) IfNoneMatch(entityTag string) *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) Pages(ctx context.Context, f func(*TimelineListResponse) error) error
- 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
- func (c *TimelineUpdateCall) Context(ctx context.Context) *TimelineUpdateCall
- func (c *TimelineUpdateCall) Do(opts ...googleapi.CallOption) (*TimelineItem, error)
- func (c *TimelineUpdateCall) Fields(s ...googleapi.Field) *TimelineUpdateCall
- func (c *TimelineUpdateCall) Header() http.Header
- func (c *TimelineUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *TimelineUpdateCall
- func (c *TimelineUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TimelineUpdateCall
- func (c *TimelineUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TimelineUpdateCalldeprecated
- type UserAction
- type UserData
Constants¶
const (// View your locationGlassLocationScope = "https://www.googleapis.com/auth/glass.location"// View and manage your Glass timelineGlassTimelineScope = "https://www.googleapis.com/auth/glass.timeline")
OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeAccount¶
type Account struct {AuthTokens []*AuthToken `json:"authTokens,omitempty"`Features []string `json:"features,omitempty"`Passwordstring `json:"password,omitempty"`UserData []*UserData `json:"userData,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AuthTokens") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AuthTokens") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Account: Represents an account passed into the Account Manager onGlass.
func (*Account)MarshalJSON¶
typeAccountsInsertCall¶
type AccountsInsertCall struct {// contains filtered or unexported fields}func (*AccountsInsertCall)Context¶
func (c *AccountsInsertCall) Context(ctxcontext.Context) *AccountsInsertCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*AccountsInsertCall)Do¶
func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account,error)
Do executes the "mirror.accounts.insert" call.Exactly one of *Account or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Account.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.
func (*AccountsInsertCall)Fields¶
func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*AccountsInsertCall)Header¶
func (c *AccountsInsertCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeAccountsService¶
type AccountsService struct {// contains filtered or unexported fields}funcNewAccountsService¶
func NewAccountsService(s *Service) *AccountsService
func (*AccountsService)Insert¶
func (r *AccountsService) Insert(userTokenstring, accountTypestring, accountNamestring, account *Account) *AccountsInsertCall
Insert: Inserts a new account for a user
typeAttachment¶
type Attachment struct {// ContentType: The MIME type of the attachment.ContentTypestring `json:"contentType,omitempty"`// ContentUrl: The URL for the content.ContentUrlstring `json:"contentUrl,omitempty"`// Id: The ID of the attachment.Idstring `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.IsProcessingContentbool `json:"isProcessingContent,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ContentType") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ContentType") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Attachment: Represents media content, such as a photo, that can beattached to a timeline item.
func (*Attachment)MarshalJSON¶
func (s *Attachment) MarshalJSON() ([]byte,error)
typeAttachmentsListResponse¶
type AttachmentsListResponse struct {// Items: The list of attachments.Items []*Attachment `json:"items,omitempty"`// Kind: The type of resource. This is always mirror#attachmentsList.Kindstring `json:"kind,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Items") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Items") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}AttachmentsListResponse: A list of Attachments. This is the responsefrom the server to GET requests on the attachments collection.
func (*AttachmentsListResponse)MarshalJSON¶
func (s *AttachmentsListResponse) MarshalJSON() ([]byte,error)
typeAuthToken¶
type AuthToken struct {AuthTokenstring `json:"authToken,omitempty"`Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "AuthToken") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AuthToken") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}func (*AuthToken)MarshalJSON¶
typeCommand¶
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.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "Type") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Type") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Command: A single menu command that is part of a Contact.
func (*Command)MarshalJSON¶
typeContact¶
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.DisplayNamestring `json:"displayName,omitempty"`// Id: An ID for this contact. This is generated by the application and// is treated as an opaque token.Idstring `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.Kindstring `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.PhoneNumberstring `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.Priorityint64 `json:"priority,omitempty"`// SharingFeatures: A list of sharing features that a contact can// handle. Allowed values are:// - ADD_CAPTIONSharingFeatures []string `json:"sharingFeatures,omitempty"`// Source: The ID of the application that created this contact. This is// populated by the APISourcestring `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.SpeakableNamestring `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.Typestring `json:"type,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AcceptCommands") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AcceptCommands") to// include in API requests with the JSON null value. By default, fields// with empty values are omitted from API requests. However, any field// with an empty value appearing in NullFields will be sent to the// server as null. It is an error if a field in this list has a// non-empty value. This may be used to include null fields in Patch// requests.NullFields []string `json:"-"`}Contact: A person or group that can be used as a creator or acontact.
func (*Contact)MarshalJSON¶
typeContactsDeleteCall¶
type ContactsDeleteCall struct {// contains filtered or unexported fields}func (*ContactsDeleteCall)Context¶
func (c *ContactsDeleteCall) Context(ctxcontext.Context) *ContactsDeleteCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*ContactsDeleteCall)Do¶
func (c *ContactsDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "mirror.contacts.delete" call.
func (*ContactsDeleteCall)Fields¶
func (c *ContactsDeleteCall) Fields(s ...googleapi.Field) *ContactsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*ContactsDeleteCall)Header¶
func (c *ContactsDeleteCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeContactsGetCall¶
type ContactsGetCall struct {// contains filtered or unexported fields}func (*ContactsGetCall)Context¶
func (c *ContactsGetCall) Context(ctxcontext.Context) *ContactsGetCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*ContactsGetCall)Do¶
func (c *ContactsGetCall) Do(opts ...googleapi.CallOption) (*Contact,error)
Do executes the "mirror.contacts.get" call.Exactly one of *Contact or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Contact.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.
func (*ContactsGetCall)Fields¶
func (c *ContactsGetCall) Fields(s ...googleapi.Field) *ContactsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*ContactsGetCall)Header¶
func (c *ContactsGetCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*ContactsGetCall)IfNoneMatch¶
func (c *ContactsGetCall) IfNoneMatch(entityTagstring) *ContactsGetCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeContactsInsertCall¶
type ContactsInsertCall struct {// contains filtered or unexported fields}func (*ContactsInsertCall)Context¶
func (c *ContactsInsertCall) Context(ctxcontext.Context) *ContactsInsertCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*ContactsInsertCall)Do¶
func (c *ContactsInsertCall) Do(opts ...googleapi.CallOption) (*Contact,error)
Do executes the "mirror.contacts.insert" call.Exactly one of *Contact or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Contact.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.
func (*ContactsInsertCall)Fields¶
func (c *ContactsInsertCall) Fields(s ...googleapi.Field) *ContactsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*ContactsInsertCall)Header¶
func (c *ContactsInsertCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeContactsListCall¶
type ContactsListCall struct {// contains filtered or unexported fields}func (*ContactsListCall)Context¶
func (c *ContactsListCall) Context(ctxcontext.Context) *ContactsListCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*ContactsListCall)Do¶
func (c *ContactsListCall) Do(opts ...googleapi.CallOption) (*ContactsListResponse,error)
Do executes the "mirror.contacts.list" call.Exactly one of *ContactsListResponse or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*ContactsListResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.
func (*ContactsListCall)Fields¶
func (c *ContactsListCall) Fields(s ...googleapi.Field) *ContactsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*ContactsListCall)Header¶
func (c *ContactsListCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*ContactsListCall)IfNoneMatch¶
func (c *ContactsListCall) IfNoneMatch(entityTagstring) *ContactsListCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeContactsListResponse¶
type ContactsListResponse struct {// Items: Contact list.Items []*Contact `json:"items,omitempty"`// Kind: The type of resource. This is always mirror#contacts.Kindstring `json:"kind,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Items") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Items") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}ContactsListResponse: A list of Contacts representing contacts. Thisis the response from the server to GET requests on the contactscollection.
func (*ContactsListResponse)MarshalJSON¶
func (s *ContactsListResponse) MarshalJSON() ([]byte,error)
typeContactsPatchCall¶
type ContactsPatchCall struct {// contains filtered or unexported fields}func (*ContactsPatchCall)Context¶
func (c *ContactsPatchCall) Context(ctxcontext.Context) *ContactsPatchCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*ContactsPatchCall)Do¶
func (c *ContactsPatchCall) Do(opts ...googleapi.CallOption) (*Contact,error)
Do executes the "mirror.contacts.patch" call.Exactly one of *Contact or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Contact.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.
func (*ContactsPatchCall)Fields¶
func (c *ContactsPatchCall) Fields(s ...googleapi.Field) *ContactsPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*ContactsPatchCall)Header¶
func (c *ContactsPatchCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeContactsService¶
type ContactsService struct {// contains filtered or unexported fields}funcNewContactsService¶
func NewContactsService(s *Service) *ContactsService
func (*ContactsService)Delete¶
func (r *ContactsService) Delete(idstring) *ContactsDeleteCall
Delete: Deletes a contact.
func (*ContactsService)Get¶
func (r *ContactsService) Get(idstring) *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(idstring, contact *Contact) *ContactsPatchCall
Patch: Updates a contact in place. This method supports patchsemantics.
func (*ContactsService)Update¶
func (r *ContactsService) Update(idstring, contact *Contact) *ContactsUpdateCall
Update: Updates a contact in place.
typeContactsUpdateCall¶
type ContactsUpdateCall struct {// contains filtered or unexported fields}func (*ContactsUpdateCall)Context¶
func (c *ContactsUpdateCall) Context(ctxcontext.Context) *ContactsUpdateCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*ContactsUpdateCall)Do¶
func (c *ContactsUpdateCall) Do(opts ...googleapi.CallOption) (*Contact,error)
Do executes the "mirror.contacts.update" call.Exactly one of *Contact or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Contact.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.
func (*ContactsUpdateCall)Fields¶
func (c *ContactsUpdateCall) Fields(s ...googleapi.Field) *ContactsUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*ContactsUpdateCall)Header¶
func (c *ContactsUpdateCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeLocation¶
type Location struct {// Accuracy: The accuracy of the location fix in meters.Accuracyfloat64 `json:"accuracy,omitempty"`// Address: The full address of the location.Addressstring `json:"address,omitempty"`// DisplayName: The name to be displayed. This may be a business name or// a user-defined place, such as "Home".DisplayNamestring `json:"displayName,omitempty"`// Id: The ID of the location.Idstring `json:"id,omitempty"`// Kind: The type of resource. This is always mirror#location.Kindstring `json:"kind,omitempty"`// Latitude: The latitude, in degrees.Latitudefloat64 `json:"latitude,omitempty"`// Longitude: The longitude, in degrees.Longitudefloat64 `json:"longitude,omitempty"`// Timestamp: The time at which this location was captured, formatted// according toRFC 3339.Timestampstring `json:"timestamp,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Accuracy") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Accuracy") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Location: A geographic location that can be associated with atimeline item.
func (*Location)MarshalJSON¶
func (*Location)UnmarshalJSON¶
typeLocationsGetCall¶
type LocationsGetCall struct {// contains filtered or unexported fields}func (*LocationsGetCall)Context¶
func (c *LocationsGetCall) Context(ctxcontext.Context) *LocationsGetCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*LocationsGetCall)Do¶
func (c *LocationsGetCall) Do(opts ...googleapi.CallOption) (*Location,error)
Do executes the "mirror.locations.get" call.Exactly one of *Location or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Location.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*LocationsGetCall)Fields¶
func (c *LocationsGetCall) Fields(s ...googleapi.Field) *LocationsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*LocationsGetCall)Header¶
func (c *LocationsGetCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*LocationsGetCall)IfNoneMatch¶
func (c *LocationsGetCall) IfNoneMatch(entityTagstring) *LocationsGetCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeLocationsListCall¶
type LocationsListCall struct {// contains filtered or unexported fields}func (*LocationsListCall)Context¶
func (c *LocationsListCall) Context(ctxcontext.Context) *LocationsListCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*LocationsListCall)Do¶
func (c *LocationsListCall) Do(opts ...googleapi.CallOption) (*LocationsListResponse,error)
Do executes the "mirror.locations.list" call.Exactly one of *LocationsListResponse or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*LocationsListResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.
func (*LocationsListCall)Fields¶
func (c *LocationsListCall) Fields(s ...googleapi.Field) *LocationsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*LocationsListCall)Header¶
func (c *LocationsListCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*LocationsListCall)IfNoneMatch¶
func (c *LocationsListCall) IfNoneMatch(entityTagstring) *LocationsListCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeLocationsListResponse¶
type LocationsListResponse struct {// Items: The list of locations.Items []*Location `json:"items,omitempty"`// Kind: The type of resource. This is always mirror#locationsList.Kindstring `json:"kind,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Items") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Items") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}LocationsListResponse: A list of Locations. This is the response fromthe server to GET requests on the locations collection.
func (*LocationsListResponse)MarshalJSON¶
func (s *LocationsListResponse) MarshalJSON() ([]byte,error)
typeLocationsService¶
type LocationsService struct {// contains filtered or unexported fields}funcNewLocationsService¶
func NewLocationsService(s *Service) *LocationsService
func (*LocationsService)Get¶
func (r *LocationsService) Get(idstring) *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.
typeMenuItem¶
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.Actionstring `json:"action,omitempty"`// ContextualCommand: 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.ContextualCommandstring `json:"contextual_command,omitempty"`// Id: The ID for this menu item. This is generated by the application// and is treated as an opaque token.Idstring `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 inputPayloadstring `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.RemoveWhenSelectedbool `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"`// ForceSendFields is a list of field names (e.g. "Action") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Action") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}MenuItem: A custom menu item that can be presented to the user by atimeline item.
func (*MenuItem)MarshalJSON¶
typeMenuValue¶
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.DisplayNamestring `json:"displayName,omitempty"`// IconUrl: URL of an icon to display with the menu item.IconUrlstring `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.Statestring `json:"state,omitempty"`// ForceSendFields is a list of field names (e.g. "DisplayName") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DisplayName") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}MenuValue: A single value that is part of a MenuItem.
func (*MenuValue)MarshalJSON¶
typeNotification¶
type Notification struct {// Collection: The collection that generated the notification.Collectionstring `json:"collection,omitempty"`// ItemId: The ID of the item that generated the notification.ItemIdstring `json:"itemId,omitempty"`// Operation: The type of operation that generated the notification.Operationstring `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.UserTokenstring `json:"userToken,omitempty"`// VerifyToken: The secret verify token provided by the service when it// subscribed for notifications.VerifyTokenstring `json:"verifyToken,omitempty"`// ForceSendFields is a list of field names (e.g. "Collection") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Collection") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Notification: A notification delivered by the API.
func (*Notification)MarshalJSON¶
func (s *Notification) MarshalJSON() ([]byte,error)
typeNotificationConfig¶
type NotificationConfig struct {// DeliveryTime: The time at which the notification should be delivered.DeliveryTimestring `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.Levelstring `json:"level,omitempty"`// ForceSendFields is a list of field names (e.g. "DeliveryTime") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DeliveryTime") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}NotificationConfig: Controls how notifications for a timeline itemare presented to the user.
func (*NotificationConfig)MarshalJSON¶
func (s *NotificationConfig) MarshalJSON() ([]byte,error)
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentAccounts *AccountsServiceContacts *ContactsServiceLocations *LocationsServiceSettings *SettingsServiceSubscriptions *SubscriptionsServiceTimeline *TimelineService// contains filtered or unexported fields} funcNewdeprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶added inv0.3.0
NewService creates a new Service.
typeSetting¶
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.Idstring `json:"id,omitempty"`// Kind: The type of resource. This is always mirror#setting.Kindstring `json:"kind,omitempty"`// Value: The setting value, as a string.Valuestring `json:"value,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Id") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Id") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Setting: A setting for Glass.
func (*Setting)MarshalJSON¶
typeSettingsGetCall¶
type SettingsGetCall struct {// contains filtered or unexported fields}func (*SettingsGetCall)Context¶
func (c *SettingsGetCall) Context(ctxcontext.Context) *SettingsGetCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*SettingsGetCall)Do¶
func (c *SettingsGetCall) Do(opts ...googleapi.CallOption) (*Setting,error)
Do executes the "mirror.settings.get" call.Exactly one of *Setting or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Setting.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.
func (*SettingsGetCall)Fields¶
func (c *SettingsGetCall) Fields(s ...googleapi.Field) *SettingsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*SettingsGetCall)Header¶
func (c *SettingsGetCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*SettingsGetCall)IfNoneMatch¶
func (c *SettingsGetCall) IfNoneMatch(entityTagstring) *SettingsGetCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeSettingsService¶
type SettingsService struct {// contains filtered or unexported fields}funcNewSettingsService¶
func NewSettingsService(s *Service) *SettingsService
func (*SettingsService)Get¶
func (r *SettingsService) Get(idstring) *SettingsGetCall
Get: Gets a single setting by ID.
typeSubscription¶
type Subscription struct {// CallbackUrl: The URL where notifications should be delivered (must// start with https://).CallbackUrlstring `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.Collectionstring `json:"collection,omitempty"`// Id: The ID of the subscription.Idstring `json:"id,omitempty"`// Kind: The type of resource. This is always mirror#subscription.Kindstring `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 toRFC 3339.Updatedstring `json:"updated,omitempty"`// UserToken: An opaque token sent to the subscriber in notifications so// that it can determine the ID of the user.UserTokenstring `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.VerifyTokenstring `json:"verifyToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CallbackUrl") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CallbackUrl") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Subscription: A subscription to events on a collection.
func (*Subscription)MarshalJSON¶
func (s *Subscription) MarshalJSON() ([]byte,error)
typeSubscriptionsDeleteCall¶
type SubscriptionsDeleteCall struct {// contains filtered or unexported fields}func (*SubscriptionsDeleteCall)Context¶
func (c *SubscriptionsDeleteCall) Context(ctxcontext.Context) *SubscriptionsDeleteCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*SubscriptionsDeleteCall)Do¶
func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "mirror.subscriptions.delete" call.
func (*SubscriptionsDeleteCall)Fields¶
func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*SubscriptionsDeleteCall)Header¶
func (c *SubscriptionsDeleteCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeSubscriptionsInsertCall¶
type SubscriptionsInsertCall struct {// contains filtered or unexported fields}func (*SubscriptionsInsertCall)Context¶
func (c *SubscriptionsInsertCall) Context(ctxcontext.Context) *SubscriptionsInsertCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*SubscriptionsInsertCall)Do¶
func (c *SubscriptionsInsertCall) Do(opts ...googleapi.CallOption) (*Subscription,error)
Do executes the "mirror.subscriptions.insert" call.Exactly one of *Subscription or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Subscription.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*SubscriptionsInsertCall)Fields¶
func (c *SubscriptionsInsertCall) Fields(s ...googleapi.Field) *SubscriptionsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*SubscriptionsInsertCall)Header¶
func (c *SubscriptionsInsertCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeSubscriptionsListCall¶
type SubscriptionsListCall struct {// contains filtered or unexported fields}func (*SubscriptionsListCall)Context¶
func (c *SubscriptionsListCall) Context(ctxcontext.Context) *SubscriptionsListCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*SubscriptionsListCall)Do¶
func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*SubscriptionsListResponse,error)
Do executes the "mirror.subscriptions.list" call.Exactly one of *SubscriptionsListResponse or error will be non-nil.Any non-2xx status code is an error. Response headers are in either*SubscriptionsListResponse.ServerResponse.Header or (if a responsewas returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.
func (*SubscriptionsListCall)Fields¶
func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*SubscriptionsListCall)Header¶
func (c *SubscriptionsListCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*SubscriptionsListCall)IfNoneMatch¶
func (c *SubscriptionsListCall) IfNoneMatch(entityTagstring) *SubscriptionsListCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeSubscriptionsListResponse¶
type SubscriptionsListResponse struct {// Items: The list of subscriptions.Items []*Subscription `json:"items,omitempty"`// Kind: The type of resource. This is always mirror#subscriptionsList.Kindstring `json:"kind,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Items") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Items") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}SubscriptionsListResponse: A list of Subscriptions. This is theresponse from the server to GET requests on the subscriptioncollection.
func (*SubscriptionsListResponse)MarshalJSON¶
func (s *SubscriptionsListResponse) MarshalJSON() ([]byte,error)
typeSubscriptionsService¶
type SubscriptionsService struct {// contains filtered or unexported fields}funcNewSubscriptionsService¶
func NewSubscriptionsService(s *Service) *SubscriptionsService
func (*SubscriptionsService)Delete¶
func (r *SubscriptionsService) Delete(idstring) *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 userand service.
func (*SubscriptionsService)Update¶
func (r *SubscriptionsService) Update(idstring, subscription *Subscription) *SubscriptionsUpdateCall
Update: Updates an existing subscription in place.
typeSubscriptionsUpdateCall¶
type SubscriptionsUpdateCall struct {// contains filtered or unexported fields}func (*SubscriptionsUpdateCall)Context¶
func (c *SubscriptionsUpdateCall) Context(ctxcontext.Context) *SubscriptionsUpdateCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*SubscriptionsUpdateCall)Do¶
func (c *SubscriptionsUpdateCall) Do(opts ...googleapi.CallOption) (*Subscription,error)
Do executes the "mirror.subscriptions.update" call.Exactly one of *Subscription or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Subscription.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*SubscriptionsUpdateCall)Fields¶
func (c *SubscriptionsUpdateCall) Fields(s ...googleapi.Field) *SubscriptionsUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*SubscriptionsUpdateCall)Header¶
func (c *SubscriptionsUpdateCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeTimelineAttachmentsDeleteCall¶
type TimelineAttachmentsDeleteCall struct {// contains filtered or unexported fields}func (*TimelineAttachmentsDeleteCall)Context¶
func (c *TimelineAttachmentsDeleteCall) Context(ctxcontext.Context) *TimelineAttachmentsDeleteCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*TimelineAttachmentsDeleteCall)Do¶
func (c *TimelineAttachmentsDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "mirror.timeline.attachments.delete" call.
func (*TimelineAttachmentsDeleteCall)Fields¶
func (c *TimelineAttachmentsDeleteCall) Fields(s ...googleapi.Field) *TimelineAttachmentsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelineAttachmentsDeleteCall)Header¶
func (c *TimelineAttachmentsDeleteCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeTimelineAttachmentsGetCall¶
type TimelineAttachmentsGetCall struct {// contains filtered or unexported fields}func (*TimelineAttachmentsGetCall)Context¶
func (c *TimelineAttachmentsGetCall) Context(ctxcontext.Context) *TimelineAttachmentsGetCall
Context sets the context to be used in this call's Do and Downloadmethods. Any pending HTTP request will be aborted if the providedcontext is canceled.
func (*TimelineAttachmentsGetCall)Do¶
func (c *TimelineAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Attachment,error)
Do executes the "mirror.timeline.attachments.get" call.Exactly one of *Attachment or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Attachment.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*TimelineAttachmentsGetCall)Download¶
func (c *TimelineAttachmentsGetCall) Download(opts ...googleapi.CallOption) (*http.Response,error)
Download fetches the API endpoint's "media" value, instead of the normalAPI response value. If the returned error is nil, the Response is guaranteed tohave a 2xx status code. Callers must close the Response.Body as usual.
func (*TimelineAttachmentsGetCall)Fields¶
func (c *TimelineAttachmentsGetCall) Fields(s ...googleapi.Field) *TimelineAttachmentsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelineAttachmentsGetCall)Header¶
func (c *TimelineAttachmentsGetCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*TimelineAttachmentsGetCall)IfNoneMatch¶
func (c *TimelineAttachmentsGetCall) IfNoneMatch(entityTagstring) *TimelineAttachmentsGetCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeTimelineAttachmentsInsertCall¶
type TimelineAttachmentsInsertCall struct {// contains filtered or unexported fields}func (*TimelineAttachmentsInsertCall)Context¶
func (c *TimelineAttachmentsInsertCall) Context(ctxcontext.Context) *TimelineAttachmentsInsertCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.This context will supersede any context previously provided to theResumableMedia method.
func (*TimelineAttachmentsInsertCall)Do¶
func (c *TimelineAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Attachment,error)
Do executes the "mirror.timeline.attachments.insert" call.Exactly one of *Attachment or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Attachment.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*TimelineAttachmentsInsertCall)Fields¶
func (c *TimelineAttachmentsInsertCall) Fields(s ...googleapi.Field) *TimelineAttachmentsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelineAttachmentsInsertCall)Header¶
func (c *TimelineAttachmentsInsertCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*TimelineAttachmentsInsertCall)Media¶
func (c *TimelineAttachmentsInsertCall) Media(rio.Reader, options ...googleapi.MediaOption) *TimelineAttachmentsInsertCall
Media specifies the media to upload in one or more chunks. The chunksize may be controlled by supplying a MediaOption generated bygoogleapi.ChunkSize. The chunk size defaults togoogleapi.DefaultUploadChunkSize.The Content-Type header used in theupload request will be determined by sniffing the contents of r,unless a MediaOption generated by googleapi.ContentType issupplied.At most one of Media and ResumableMedia may be set.
func (*TimelineAttachmentsInsertCall)ProgressUpdater¶
func (c *TimelineAttachmentsInsertCall) ProgressUpdater(pugoogleapi.ProgressUpdater) *TimelineAttachmentsInsertCall
ProgressUpdater provides a callback function that will be calledafter every chunk. It should be a low-latency function in order tonot slow down the upload operation. This should only be called whenusing ResumableMedia (as opposed to Media).
func (*TimelineAttachmentsInsertCall)ResumableMediadeprecated
func (c *TimelineAttachmentsInsertCall) ResumableMedia(ctxcontext.Context, rio.ReaderAt, sizeint64, mediaTypestring) *TimelineAttachmentsInsertCall
ResumableMedia specifies the media to upload in chunks and can becanceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaTypeidentifies the MIME media type of the upload, such as "image/png". IfmediaType is "", it will be auto-detected. The provided ctx willsupersede any context previously provided to the Context method.
typeTimelineAttachmentsListCall¶
type TimelineAttachmentsListCall struct {// contains filtered or unexported fields}func (*TimelineAttachmentsListCall)Context¶
func (c *TimelineAttachmentsListCall) Context(ctxcontext.Context) *TimelineAttachmentsListCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*TimelineAttachmentsListCall)Do¶
func (c *TimelineAttachmentsListCall) Do(opts ...googleapi.CallOption) (*AttachmentsListResponse,error)
Do executes the "mirror.timeline.attachments.list" call.Exactly one of *AttachmentsListResponse or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*AttachmentsListResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.
func (*TimelineAttachmentsListCall)Fields¶
func (c *TimelineAttachmentsListCall) Fields(s ...googleapi.Field) *TimelineAttachmentsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelineAttachmentsListCall)Header¶
func (c *TimelineAttachmentsListCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*TimelineAttachmentsListCall)IfNoneMatch¶
func (c *TimelineAttachmentsListCall) IfNoneMatch(entityTagstring) *TimelineAttachmentsListCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeTimelineAttachmentsService¶
type TimelineAttachmentsService struct {// contains filtered or unexported fields}funcNewTimelineAttachmentsService¶
func NewTimelineAttachmentsService(s *Service) *TimelineAttachmentsService
func (*TimelineAttachmentsService)Delete¶
func (r *TimelineAttachmentsService) Delete(itemIdstring, attachmentIdstring) *TimelineAttachmentsDeleteCall
Delete: Deletes an attachment from a timeline item.
func (*TimelineAttachmentsService)Get¶
func (r *TimelineAttachmentsService) Get(itemIdstring, attachmentIdstring) *TimelineAttachmentsGetCall
Get: Retrieves an attachment on a timeline item by item ID andattachment ID.
func (*TimelineAttachmentsService)Insert¶
func (r *TimelineAttachmentsService) Insert(itemIdstring) *TimelineAttachmentsInsertCall
Insert: Adds a new attachment to a timeline item.
func (*TimelineAttachmentsService)List¶
func (r *TimelineAttachmentsService) List(itemIdstring) *TimelineAttachmentsListCall
List: Returns a list of attachments for a timeline item.
typeTimelineDeleteCall¶
type TimelineDeleteCall struct {// contains filtered or unexported fields}func (*TimelineDeleteCall)Context¶
func (c *TimelineDeleteCall) Context(ctxcontext.Context) *TimelineDeleteCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*TimelineDeleteCall)Do¶
func (c *TimelineDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "mirror.timeline.delete" call.
func (*TimelineDeleteCall)Fields¶
func (c *TimelineDeleteCall) Fields(s ...googleapi.Field) *TimelineDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelineDeleteCall)Header¶
func (c *TimelineDeleteCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeTimelineGetCall¶
type TimelineGetCall struct {// contains filtered or unexported fields}func (*TimelineGetCall)Context¶
func (c *TimelineGetCall) Context(ctxcontext.Context) *TimelineGetCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*TimelineGetCall)Do¶
func (c *TimelineGetCall) Do(opts ...googleapi.CallOption) (*TimelineItem,error)
Do executes the "mirror.timeline.get" call.Exactly one of *TimelineItem or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*TimelineItem.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*TimelineGetCall)Fields¶
func (c *TimelineGetCall) Fields(s ...googleapi.Field) *TimelineGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelineGetCall)Header¶
func (c *TimelineGetCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*TimelineGetCall)IfNoneMatch¶
func (c *TimelineGetCall) IfNoneMatch(entityTagstring) *TimelineGetCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeTimelineInsertCall¶
type TimelineInsertCall struct {// contains filtered or unexported fields}func (*TimelineInsertCall)Context¶
func (c *TimelineInsertCall) Context(ctxcontext.Context) *TimelineInsertCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.This context will supersede any context previously provided to theResumableMedia method.
func (*TimelineInsertCall)Do¶
func (c *TimelineInsertCall) Do(opts ...googleapi.CallOption) (*TimelineItem,error)
Do executes the "mirror.timeline.insert" call.Exactly one of *TimelineItem or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*TimelineItem.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*TimelineInsertCall)Fields¶
func (c *TimelineInsertCall) Fields(s ...googleapi.Field) *TimelineInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelineInsertCall)Header¶
func (c *TimelineInsertCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*TimelineInsertCall)Media¶
func (c *TimelineInsertCall) Media(rio.Reader, options ...googleapi.MediaOption) *TimelineInsertCall
Media specifies the media to upload in one or more chunks. The chunksize may be controlled by supplying a MediaOption generated bygoogleapi.ChunkSize. The chunk size defaults togoogleapi.DefaultUploadChunkSize.The Content-Type header used in theupload request will be determined by sniffing the contents of r,unless a MediaOption generated by googleapi.ContentType issupplied.At most one of Media and ResumableMedia may be set.
func (*TimelineInsertCall)ProgressUpdater¶
func (c *TimelineInsertCall) ProgressUpdater(pugoogleapi.ProgressUpdater) *TimelineInsertCall
ProgressUpdater provides a callback function that will be calledafter every chunk. It should be a low-latency function in order tonot slow down the upload operation. This should only be called whenusing ResumableMedia (as opposed to Media).
func (*TimelineInsertCall)ResumableMediadeprecated
func (c *TimelineInsertCall) ResumableMedia(ctxcontext.Context, rio.ReaderAt, sizeint64, mediaTypestring) *TimelineInsertCall
ResumableMedia specifies the media to upload in chunks and can becanceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaTypeidentifies the MIME media type of the upload, such as "image/png". IfmediaType is "", it will be auto-detected. The provided ctx willsupersede any context previously provided to the Context method.
typeTimelineItem¶
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.BundleIdstring `json:"bundleId,omitempty"`// CanonicalUrl: A canonical URL pointing to the canonical/high quality// version of the data represented by the timeline item.CanonicalUrlstring `json:"canonicalUrl,omitempty"`// Created: The time at which this item was created, formatted according// toRFC 3339.Createdstring `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 toRFC 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.DisplayTimestring `json:"displayTime,omitempty"`// Etag: ETag for this item.Etagstring `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.Htmlstring `json:"html,omitempty"`// Id: The ID of the timeline item. This is unique within a user's// timeline.Idstring `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.InReplyTostring `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// falseIsBundleCoverbool `json:"isBundleCover,omitempty"`// IsDeleted: When true, indicates this item is deleted, and only the ID// property is set.IsDeletedbool `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.IsPinnedbool `json:"isPinned,omitempty"`// Kind: The type of resource. This is always mirror#timelineItem.Kindstring `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.PinScoreint64 `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.SelfLinkstring `json:"selfLink,omitempty"`// SourceItemId: Opaque string you can use to map a timeline item to// data in your own service.SourceItemIdstring `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.SpeakableTextstring `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.SpeakableTypestring `json:"speakableType,omitempty"`// Text: Text content of this item.Textstring `json:"text,omitempty"`// Title: The title of this item.Titlestring `json:"title,omitempty"`// Updated: The time at which this item was last modified, formatted// according toRFC 3339.Updatedstring `json:"updated,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Attachments") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Attachments") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TimelineItem: Each item in the user's timeline is represented as aTimelineItem JSON structure, described below.
func (*TimelineItem)MarshalJSON¶
func (s *TimelineItem) MarshalJSON() ([]byte,error)
typeTimelineListCall¶
type TimelineListCall struct {// contains filtered or unexported fields}func (*TimelineListCall)BundleId¶
func (c *TimelineListCall) BundleId(bundleIdstring) *TimelineListCall
BundleId sets the optional parameter "bundleId": If provided, onlyitems with the given bundleId will be returned.
func (*TimelineListCall)Context¶
func (c *TimelineListCall) Context(ctxcontext.Context) *TimelineListCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*TimelineListCall)Do¶
func (c *TimelineListCall) Do(opts ...googleapi.CallOption) (*TimelineListResponse,error)
Do executes the "mirror.timeline.list" call.Exactly one of *TimelineListResponse or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*TimelineListResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.
func (*TimelineListCall)Fields¶
func (c *TimelineListCall) Fields(s ...googleapi.Field) *TimelineListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelineListCall)Header¶
func (c *TimelineListCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*TimelineListCall)IfNoneMatch¶
func (c *TimelineListCall) IfNoneMatch(entityTagstring) *TimelineListCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
func (*TimelineListCall)IncludeDeleted¶
func (c *TimelineListCall) IncludeDeleted(includeDeletedbool) *TimelineListCall
IncludeDeleted sets the optional parameter "includeDeleted": If true,tombstone records for deleted items will be returned.
func (*TimelineListCall)MaxResults¶
func (c *TimelineListCall) MaxResults(maxResultsint64) *TimelineListCall
MaxResults sets the optional parameter "maxResults": The maximumnumber of items to include in the response, used for paging.
func (*TimelineListCall)OrderBy¶
func (c *TimelineListCall) OrderBy(orderBystring) *TimelineListCall
OrderBy sets the optional parameter "orderBy": Controls the order inwhich timeline items are returned.
Possible values:
"displayTime" - Results will be ordered by displayTime (default).
This is the same ordering as is used in the timeline on the device.
"writeTime" - Results will be ordered by the time at which they
were last written to the data store.
func (*TimelineListCall)PageToken¶
func (c *TimelineListCall) PageToken(pageTokenstring) *TimelineListCall
PageToken sets the optional parameter "pageToken": Token for the pageof results to return.
func (*TimelineListCall)Pages¶
func (c *TimelineListCall) Pages(ctxcontext.Context, f func(*TimelineListResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*TimelineListCall)PinnedOnly¶
func (c *TimelineListCall) PinnedOnly(pinnedOnlybool) *TimelineListCall
PinnedOnly sets the optional parameter "pinnedOnly": If true, onlypinned items will be returned.
func (*TimelineListCall)SourceItemId¶
func (c *TimelineListCall) SourceItemId(sourceItemIdstring) *TimelineListCall
SourceItemId sets the optional parameter "sourceItemId": If provided,only items with the given sourceItemId will be returned.
typeTimelineListResponse¶
type TimelineListResponse struct {// Items: Items in the timeline.Items []*TimelineItem `json:"items,omitempty"`// Kind: The type of resource. This is always mirror#timeline.Kindstring `json:"kind,omitempty"`// NextPageToken: The next page token. Provide this as the pageToken// parameter in the request to retrieve the next page of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Items") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Items") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TimelineListResponse: A list of timeline items. This is the responsefrom the server to GET requests on the timeline collection.
func (*TimelineListResponse)MarshalJSON¶
func (s *TimelineListResponse) MarshalJSON() ([]byte,error)
typeTimelinePatchCall¶
type TimelinePatchCall struct {// contains filtered or unexported fields}func (*TimelinePatchCall)Context¶
func (c *TimelinePatchCall) Context(ctxcontext.Context) *TimelinePatchCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*TimelinePatchCall)Do¶
func (c *TimelinePatchCall) Do(opts ...googleapi.CallOption) (*TimelineItem,error)
Do executes the "mirror.timeline.patch" call.Exactly one of *TimelineItem or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*TimelineItem.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*TimelinePatchCall)Fields¶
func (c *TimelinePatchCall) Fields(s ...googleapi.Field) *TimelinePatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelinePatchCall)Header¶
func (c *TimelinePatchCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeTimelineService¶
type TimelineService struct {Attachments *TimelineAttachmentsService// contains filtered or unexported fields}funcNewTimelineService¶
func NewTimelineService(s *Service) *TimelineService
func (*TimelineService)Delete¶
func (r *TimelineService) Delete(idstring) *TimelineDeleteCall
Delete: Deletes a timeline item.
func (*TimelineService)Get¶
func (r *TimelineService) Get(idstring) *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(idstring, timelineitem *TimelineItem) *TimelinePatchCall
Patch: Updates a timeline item in place. This method supports patchsemantics.
func (*TimelineService)Update¶
func (r *TimelineService) Update(idstring, timelineitem *TimelineItem) *TimelineUpdateCall
Update: Updates a timeline item in place.
typeTimelineUpdateCall¶
type TimelineUpdateCall struct {// contains filtered or unexported fields}func (*TimelineUpdateCall)Context¶
func (c *TimelineUpdateCall) Context(ctxcontext.Context) *TimelineUpdateCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.This context will supersede any context previously provided to theResumableMedia method.
func (*TimelineUpdateCall)Do¶
func (c *TimelineUpdateCall) Do(opts ...googleapi.CallOption) (*TimelineItem,error)
Do executes the "mirror.timeline.update" call.Exactly one of *TimelineItem or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*TimelineItem.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*TimelineUpdateCall)Fields¶
func (c *TimelineUpdateCall) Fields(s ...googleapi.Field) *TimelineUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TimelineUpdateCall)Header¶
func (c *TimelineUpdateCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*TimelineUpdateCall)Media¶
func (c *TimelineUpdateCall) Media(rio.Reader, options ...googleapi.MediaOption) *TimelineUpdateCall
Media specifies the media to upload in one or more chunks. The chunksize may be controlled by supplying a MediaOption generated bygoogleapi.ChunkSize. The chunk size defaults togoogleapi.DefaultUploadChunkSize.The Content-Type header used in theupload request will be determined by sniffing the contents of r,unless a MediaOption generated by googleapi.ContentType issupplied.At most one of Media and ResumableMedia may be set.
func (*TimelineUpdateCall)ProgressUpdater¶
func (c *TimelineUpdateCall) ProgressUpdater(pugoogleapi.ProgressUpdater) *TimelineUpdateCall
ProgressUpdater provides a callback function that will be calledafter every chunk. It should be a low-latency function in order tonot slow down the upload operation. This should only be called whenusing ResumableMedia (as opposed to Media).
func (*TimelineUpdateCall)ResumableMediadeprecated
func (c *TimelineUpdateCall) ResumableMedia(ctxcontext.Context, rio.ReaderAt, sizeint64, mediaTypestring) *TimelineUpdateCall
ResumableMedia specifies the media to upload in chunks and can becanceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaTypeidentifies the MIME media type of the upload, such as "image/png". IfmediaType is "", it will be auto-detected. The provided ctx willsupersede any context previously provided to the Context method.
typeUserAction¶
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.Payloadstring `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.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "Payload") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Payload") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}UserAction: Represents an action taken by the user that triggered anotification.
func (*UserAction)MarshalJSON¶
func (s *UserAction) MarshalJSON() ([]byte,error)
typeUserData¶
type UserData struct {Keystring `json:"key,omitempty"`Valuestring `json:"value,omitempty"`// ForceSendFields is a list of field names (e.g. "Key") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Key") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}