GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card (google_api_chat v0.30.0) View Source

A card is a UI element that can contain UI widgets such as text and images. For more information, see Cards . For example, the following JSON creates a card that has a header with the name, position, icons, and link for a contact, followed by a section with contact information like email and phone number. { "header": { "title": "Heba Salam", "subtitle": "Software Engineer", "imageStyle": "ImageStyle.AVATAR", "imageUrl": "https://example.com/heba_salam.png", "imageAltText": "Avatar for Heba Salam" }, "sections" : [ { "header": "Contact Info", "widgets": [ { "decorated_text": { "icon": { "knownIcon": "EMAIL" }, "content": "heba.salam@example.com" } }, { "decoratedText": { "icon": { "knownIcon": "PERSON" }, "content": "Online" } }, { "decoratedText": { "icon": { "knownIcon": "PHONE" }, "content": "+1 (555) 555-1234" } }, { "buttons": [ { "textButton": { "text": "Share", }, "onClick": { "openLink": { "url": "https://example.com/share" } } }, { "textButton": { "text": "Edit", }, "onClick": { "action": { "function": "goToView", "parameters": [ { "key": "viewType", "value": "EDIT" } ], "loadIndicator": "LoadIndicator.SPINNER" } } } ] } ], "collapsible": true, "uncollapsibleWidgetsCount": 3 } ], "cardActions": [ { "actionLabel": "Send Feedback", "onClick": { "openLink": { "url": "https://example.com/feedback" } } } ], "name": "contact-card-K3wB6arF2H9L" }

Attributes

  • cardActions (type: list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1CardAction.t), default: nil) - The actions of this card. They are added to a card's generated toolbar menu. For example, the following JSON constructs a card action menu with Settings and Send Feedback options: "card_actions": [ { "actionLabel": "Setting", "onClick": { "action": { "functionName": "goToView", "parameters": [ { "key": "viewType", "value": "SETTING" } ], "loadIndicator": "LoadIndicator.SPINNER" } } }, { "actionLabel": "Send Feedback", "onClick": { "openLink": { "url": "https://example.com/feedback" } } } ]
  • displayStyle (type: String.t, default: nil) - The display style for peekCardHeader.
  • fixedFooter (type: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CardFixedFooter.t, default: nil) - The fixed footer shown at the bottom of this card.
  • header (type: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CardHeader.t, default: nil) - The header of the card. A header usually contains a title and an image.
  • name (type: String.t, default: nil) - Name of the card, which is used as a identifier for the card in card navigation.
  • peekCardHeader (type: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CardHeader.t, default: nil) - When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards.
  • sections (type: list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1Section.t), default: nil) - Sections are separated by a line divider.

Link to this section Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Link to this section Types

Specs

t() :: %GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card{
  cardActions: [GoogleApi.Chat.V1.Model.GoogleAppsCardV1CardAction.t()] | nil,
  displayStyle: String.t() | nil,
  fixedFooter:
    GoogleApi.Chat.V1.Model.GoogleAppsCardV1CardFixedFooter.t() | nil,
  header: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CardHeader.t() | nil,
  name: String.t() | nil,
  peekCardHeader: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CardHeader.t() | nil,
  sections: [GoogleApi.Chat.V1.Model.GoogleAppsCardV1Section.t()] | nil
}

Link to this section Functions

Specs

decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.