MediaGenericCard
public struct MediaGenericCard : WaveMedia
Displays a generic template, also known as Hero Card. https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic Example Query:
curl -X GET "https://dev.api.wienbot.wave-ai.com/message\
?q=sima" \
-H "Content-Type: application/json"
Example Response:
"mediaAdvanced": {
"type": "genericCard",
"imageURL": "https://www.wien.gv.at/advuew/internet/AdvPrSrv.asp?Layout=picture&Type=K&BILDCD=2013072214131924",
"buttons": [
{
"url": "https://www.wien.gv.at/advuew/internet/AdvPrSrv.asp?Layout=politiker&Type=K&AUSSEN=&SUCH=Sima%20Ulli,%20Mag.&personcd=2004073010475508&SUCHNAME=Sima%20Ulli&HIST=&HP=",
"title": "Kontakt"
}
],
"subTitle": "Amtsführende Stadträtin, 1010 Wien, Rathausplatz 1, Telefon +43 1 4000 81341, E-Mail ulli.sima@wien.gv.at",
"title": "Mag. Ulli Sima, Landesreg."
},
-
Type of a MediaGenericCard in json is ‘genericCard’.
Declaration
Swift
public static var type: WaveMediaType -
Title to display.
Declaration
Swift
public let title: String -
Subtitle to display. Optional.
Declaration
Swift
public let subTitle: String? -
Url to image to display. Needs to be an https resource so all clients can open it. Image should be a png or url
Declaration
Swift
public let imageURL: URL? -
Default URL to open when card is tapped. Optional.
Declaration
Swift
public let defaultAction: URL? -
Buttons to show as part of the hero card. Optional.
Declaration
Swift
public let buttons: [MediaButton]?
MediaGenericCard Structure Reference