gogol-mirror-0.0.1: Google Mirror SDK.

Copyright(c) 2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Mirror

Contents

Description

API for interacting with Glass users via the timeline.

See: Google Mirror API Reference

Synopsis

Service Configuration

mirrorService :: Service Source

Default request referring to version v1 of the Google Mirror API. This contains the host and root path used as a starting point for constructing service requests.

API Declaration

Resources

mirror.accounts.insert

mirror.contacts.delete

mirror.contacts.get

mirror.contacts.insert

mirror.contacts.list

mirror.contacts.patch

mirror.contacts.update

mirror.locations.get

mirror.locations.list

mirror.settings.get

mirror.subscriptions.delete

mirror.subscriptions.insert

mirror.subscriptions.list

mirror.subscriptions.update

mirror.timeline.attachments.delete

mirror.timeline.attachments.get

mirror.timeline.attachments.insert

mirror.timeline.attachments.list

mirror.timeline.delete

mirror.timeline.get

mirror.timeline.insert

mirror.timeline.list

mirror.timeline.patch

mirror.timeline.update

Types

TimelineListOrderBy

data TimelineListOrderBy Source

Controls the order in which timeline items are returned.

Constructors

DisplayTime

displayTime Results will be ordered by displayTime (default). This is the same ordering as is used in the timeline on the device.

WriteTime

writeTime Results will be ordered by the time at which they were last written to the data store.

NotificationConfig

notificationConfig :: NotificationConfig Source

Creates a value of NotificationConfig with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

ncDeliveryTime :: Lens' NotificationConfig (Maybe UTCTime) Source

The time at which the notification should be delivered.

ncLevel :: Lens' NotificationConfig (Maybe Text) Source

Describes how important the notification is. Allowed values are: - DEFAULT - Notifications of default importance. A chime will be played to alert users.

Command

data Command Source

A single menu command that is part of a Contact.

See: command smart constructor.

command :: Command Source

Creates a value of Command with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

cType :: Lens' Command (Maybe Text) Source

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.

LocationsListResponse

locationsListResponse :: LocationsListResponse Source

Creates a value of LocationsListResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

llrKind :: Lens' LocationsListResponse Text Source

The type of resource. This is always mirror#locationsList.

Location

data Location Source

A geographic location that can be associated with a timeline item.

See: location smart constructor.

location :: Location Source

Creates a value of Location with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

lKind :: Lens' Location Text Source

The type of resource. This is always mirror#location.

lLatitude :: Lens' Location (Maybe Double) Source

The latitude, in degrees.

lAddress :: Lens' Location (Maybe Text) Source

The full address of the location.

lDisplayName :: Lens' Location (Maybe Text) Source

The name to be displayed. This may be a business name or a user-defined place, such as "Home".

lId :: Lens' Location (Maybe Text) Source

The ID of the location.

lAccuracy :: Lens' Location (Maybe Double) Source

The accuracy of the location fix in meters.

lLongitude :: Lens' Location (Maybe Double) Source

The longitude, in degrees.

lTimestamp :: Lens' Location (Maybe UTCTime) Source

The time at which this location was captured, formatted according to RFC 3339.

Notification

notification :: Notification Source

Creates a value of Notification with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

nOperation :: Lens' Notification (Maybe Text) Source

The type of operation that generated the notification.

nItemId :: Lens' Notification (Maybe Text) Source

The ID of the item that generated the notification.

nCollection :: Lens' Notification (Maybe Text) Source

The collection that generated the notification.

nUserActions :: Lens' Notification [UserAction] Source

A list of actions taken by the user that triggered the notification.

nVerifyToken :: Lens' Notification (Maybe Text) Source

The secret verify token provided by the service when it subscribed for notifications.

nUserToken :: Lens' Notification (Maybe Text) Source

The user token provided by the service when it subscribed for notifications.

Contact

data Contact Source

A person or group that can be used as a creator or a contact.

See: contact smart constructor.

contact :: Contact Source

Creates a value of Contact with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

conAcceptCommands :: Lens' Contact [Command] Source

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.

conSharingFeatures :: Lens' Contact [Text] Source

A list of sharing features that a contact can handle. Allowed values are: - ADD_CAPTION

conImageURLs :: Lens' Contact [Text] Source

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.

conPriority :: Lens' Contact (Maybe Word32) Source

Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.

conKind :: Lens' Contact Text Source

The type of resource. This is always mirror#contact.

conAcceptTypes :: Lens' Contact [Text] Source

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.

conPhoneNumber :: Lens' Contact (Maybe Text) Source

Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.

conDisplayName :: Lens' Contact (Maybe Text) Source

The name to display for this contact.

conSource :: Lens' Contact (Maybe Text) Source

The ID of the application that created this contact. This is populated by the API

conId :: Lens' Contact (Maybe Text) Source

An ID for this contact. This is generated by the application and is treated as an opaque token.

conType :: Lens' Contact (Maybe Text) Source

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.

conSpeakableName :: Lens' Contact (Maybe Text) Source

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.

AuthToken

authToken :: AuthToken Source

Creates a value of AuthToken with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

AttachmentsListResponse

attachmentsListResponse :: AttachmentsListResponse Source

Creates a value of AttachmentsListResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

alrKind :: Lens' AttachmentsListResponse Text Source

The type of resource. This is always mirror#attachmentsList.

MenuItem

data MenuItem Source

A custom menu item that can be presented to the user by a timeline item.

See: menuItem smart constructor.

menuItem :: MenuItem Source

Creates a value of MenuItem with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

miValues :: Lens' MenuItem [MenuValue] Source

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.

miRemoveWhenSelected :: Lens' MenuItem (Maybe Bool) Source

If set to true on a CUSTOM menu item, that item will be removed from the menu after it is selected.

miAction :: Lens' MenuItem (Maybe Text) Source

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.

miPayload :: Lens' MenuItem (Maybe Text) Source

A generic payload whose meaning changes depending on this MenuItem's action. - When the action is OPEN_URI, the payload is the URL of the website to view. - When the action is PLAY_VIDEO, the payload is the streaming URL of the video - When the action is GET_MEDIA_INPUT, the payload is the text transcription of a user's speech input

miContextualCommand :: Lens' MenuItem (Maybe Text) Source

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.

miId :: Lens' MenuItem (Maybe Text) Source

The ID for this menu item. This is generated by the application and is treated as an opaque token.

Setting

setting :: Setting Source

Creates a value of Setting with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

sKind :: Lens' Setting Text Source

The type of resource. This is always mirror#setting.

sValue :: Lens' Setting (Maybe Text) Source

The setting value, as a string.

sId :: Lens' Setting (Maybe Text) Source

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.

Attachment

data Attachment Source

Represents media content, such as a photo, that can be attached to a timeline item.

See: attachment smart constructor.

attachment :: Attachment Source

Creates a value of Attachment with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

aContentURL :: Lens' Attachment (Maybe Text) Source

The URL for the content.

aId :: Lens' Attachment (Maybe Text) Source

The ID of the attachment.

aIsProcessingContent :: Lens' Attachment (Maybe Bool) Source

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.

aContentType :: Lens' Attachment (Maybe Text) Source

The MIME type of the attachment.

Account

data Account Source

Represents an account passed into the Account Manager on Glass.

See: account smart constructor.

account :: Account Source

Creates a value of Account with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

UserData

userData :: UserData Source

Creates a value of UserData with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

UserAction

data UserAction Source

Represents an action taken by the user that triggered a notification.

See: userAction smart constructor.

userAction :: UserAction Source

Creates a value of UserAction with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

uaPayload :: Lens' UserAction (Maybe Text) Source

An optional payload for the action. For actions of type CUSTOM, this is the ID of the custom menu item that was selected.

uaType :: Lens' UserAction (Maybe Text) Source

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.

TimelineListResponse

data TimelineListResponse Source

A list of timeline items. This is the response from the server to GET requests on the timeline collection.

See: timelineListResponse smart constructor.

timelineListResponse :: TimelineListResponse Source

Creates a value of TimelineListResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

tlrNextPageToken :: Lens' TimelineListResponse (Maybe Text) Source

The next page token. Provide this as the pageToken parameter in the request to retrieve the next page of results.

tlrKind :: Lens' TimelineListResponse Text Source

The type of resource. This is always mirror#timeline.

ContactsListResponse

data ContactsListResponse Source

A list of Contacts representing contacts. This is the response from the server to GET requests on the contacts collection.

See: contactsListResponse smart constructor.

contactsListResponse :: ContactsListResponse Source

Creates a value of ContactsListResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

clrKind :: Lens' ContactsListResponse Text Source

The type of resource. This is always mirror#contacts.

MenuValue

data MenuValue Source

A single value that is part of a MenuItem.

See: menuValue smart constructor.

menuValue :: MenuValue Source

Creates a value of MenuValue with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

mvState :: Lens' MenuValue (Maybe Text) Source

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.

mvDisplayName :: Lens' MenuValue (Maybe Text) Source

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.

mvIconURL :: Lens' MenuValue (Maybe Text) Source

URL of an icon to display with the menu item.

Subscription

subscription :: Subscription Source

Creates a value of Subscription with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

subCallbackURL :: Lens' Subscription (Maybe Text) Source

The URL where notifications should be delivered (must start with https://).

subOperation :: Lens' Subscription [Text] Source

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.

subNotification :: Lens' Subscription (Maybe Notification) Source

Container object for notifications. This is not populated in the Subscription resource.

subKind :: Lens' Subscription Text Source

The type of resource. This is always mirror#subscription.

subCollection :: Lens' Subscription (Maybe Text) Source

The collection to subscribe to. Allowed values are: - timeline - Changes in the timeline including insertion, deletion, and updates. - locations - Location updates. - settings - Settings updates.

subVerifyToken :: Lens' Subscription (Maybe Text) Source

A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google.

subUserToken :: Lens' Subscription (Maybe Text) Source

An opaque token sent to the subscriber in notifications so that it can determine the ID of the user.

subId :: Lens' Subscription (Maybe Text) Source

The ID of the subscription.

subUpdated :: Lens' Subscription (Maybe UTCTime) Source

The time at which this subscription was last modified, formatted according to RFC 3339.

TimelineItem

data TimelineItem Source

Each item in the user's timeline is represented as a TimelineItem JSON structure, described below.

See: timelineItem smart constructor.

tiCreator :: Lens' TimelineItem (Maybe Contact) Source

The user or group that created this item.

tiDisplayTime :: Lens' TimelineItem (Maybe UTCTime) Source

The time that should be displayed when this item is viewed in the timeline, formatted according to RFC 3339. This user's timeline is sorted chronologically on display time, so this will also determine where the item is displayed in the timeline. If not set by the service, the display time defaults to the updated time.

tiEtag :: Lens' TimelineItem (Maybe Text) Source

ETag for this item.

tiIsDeleted :: Lens' TimelineItem (Maybe Bool) Source

When true, indicates this item is deleted, and only the ID property is set.

tiPinScore :: Lens' TimelineItem (Maybe Int32) Source

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.

tiAttachments :: Lens' TimelineItem [Attachment] Source

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: where attachment_index is the 0-based index of this array. - cid: where attachment_id is the ID of the attachment.

tiLocation :: Lens' TimelineItem (Maybe Location) Source

The geographic location associated with this item.

tiMenuItems :: Lens' TimelineItem [MenuItem] Source

A list of menu items that will be presented to the user when this item is selected in the timeline.

tiNotification :: Lens' TimelineItem (Maybe NotificationConfig) Source

Controls how notifications for this item are presented on the device. If this is missing, no notification will be generated.

tiText :: Lens' TimelineItem (Maybe Text) Source

Text content of this item.

tiKind :: Lens' TimelineItem Text Source

The type of resource. This is always mirror#timelineItem.

tiCreated :: Lens' TimelineItem (Maybe UTCTime) Source

The time at which this item was created, formatted according to RFC 3339.

tiSpeakableText :: Lens' TimelineItem (Maybe Text) Source

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.

tiIsBundleCover :: Lens' TimelineItem (Maybe Bool) Source

Whether this item is a bundle cover. If an item is marked as a bundle cover, it will be the entry point to the bundle of items that have the same bundleId as that item. It will be shown only on the main timeline — not within the opened bundle. On the main timeline, items that are shown are: - Items that have isBundleCover set to true - Items that do not have a bundleId In a bundle sub-timeline, items that are shown are: - Items that have the bundleId in question AND isBundleCover set to false

tiSpeakableType :: Lens' TimelineItem (Maybe Text) Source

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.

tiBundleId :: Lens' TimelineItem (Maybe Text) Source

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.

tiCanonicalURL :: Lens' TimelineItem (Maybe Text) Source

A canonical URL pointing to the canonical/high quality version of the data represented by the timeline item.

tiSelfLink :: Lens' TimelineItem (Maybe Text) Source

A URL that can be used to retrieve this item.

tiIsPinned :: Lens' TimelineItem (Maybe Bool) Source

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.

tiSourceItemId :: Lens' TimelineItem (Maybe Text) Source

Opaque string you can use to map a timeline item to data in your own service.

tiId :: Lens' TimelineItem (Maybe Text) Source

The ID of the timeline item. This is unique within a user's timeline.

tiHTML :: Lens' TimelineItem (Maybe Text) Source

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.

tiUpdated :: Lens' TimelineItem (Maybe UTCTime) Source

The time at which this item was last modified, formatted according to RFC 3339.

tiRecipients :: Lens' TimelineItem [Contact] Source

A list of users or groups that this item has been shared with.

tiTitle :: Lens' TimelineItem (Maybe Text) Source

The title of this item.

tiInReplyTo :: Lens' TimelineItem (Maybe Text) Source

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.

SubscriptionsListResponse

subscriptionsListResponse :: SubscriptionsListResponse Source

Creates a value of SubscriptionsListResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

slrKind :: Lens' SubscriptionsListResponse Text Source

The type of resource. This is always mirror#subscriptionsList.