Image cards

meya.image

Outputs an image specified by the image url. Renders on each integration as an image.

PropertyDescription
image_urlthe url of the image to outputRequired

Example of an image card used in flow and a custom component.

component: meya.image
properties:
	image_url: "http://bit.ly/1NPO0xx"
from meya.cards import Image

image_card = Image(image_url="http://bit.ly/1NPO0xx")
742

meya.image_suggestions

Outputs an image and suggested responses. Renders on each integration differently, depending on the specifications of the integration (e.g. on Messenger suggestions are buttons, on Kik they are keyboard suggested responses).

PropertyDescription
image_urlthe url of the image to outputRequired
suggestionsa list of suggested responses
modeeither quick_reply or buttonsOptional Default: quick_reply
passthruautomatically advance without waiting on userOptional Default: false

Example of image with suggestions declared in flow and a custom component.

component: meya.image_suggestions
properties:
  image_url: "http://bit.ly/1NPO0xx"
  mode: quick_reply
  suggestions:
    - Cute
    - Not cute
    - Kind of cute
from meya.cards import ImageWithButtons, Button

image_url = "http://bit.ly/1NPO0xx"
buttons = [
  Button(text='Cute'),
  Button(text='Not cute'),
  Button(text='Kind of cute')
]
card = ImageWithButtons(image_url=image_url, buttons=buttons, mode="quick_reply")
742

meya.image_buttons

Similar to meya.image_suggestions. Uses buttons instead of suggestions.

PropertyDescription
image_urlthe url of the image to outputRequired
buttonsan array of Buttons
modeeither quick_reply or `buttonsOptional Default: buttons
passthruautomatically advance without waiting on userOptional Default: false

Example of image with buttons used in a flow and a custom component.

component: meya.image_buttons
properties:
  image_url: "http://bit.ly/1NPO0xx"
  mode: buttons
  buttons:
    - text: Cute
      action: next
    - text: Not cute
      action: next
    - text: Kind of cute
      action: next
from meya.cards import ImageWithButtons, Button

image_url = "http://bit.ly/1NPO0xx"
buttons = [
  Button(text='Cute', action="next"),
  Button(text='Not cute', action="next"),
  Button(text='Kind of cute', action="next")
]
card = ImageWithButtons(image_url=image_url, buttons=buttons, mode="buttons")