Media Advanced

  • The Action.mediaAdvanced property can contain different types of media, which are listed here.

    See more

    Declaration

    Swift

    public enum WaveMediaType : String, Codable
  • Display a button that opens a URL.

    See more

    Declaration

    Swift

    public struct MediaButton : 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."
         },
    
    See more

    Declaration

    Swift

    public struct MediaGenericCard : WaveMedia
  • Displays generic cards in a carousel. Currently not supported by apps, only supported by facebook.

    See more

    Declaration

    Swift

    public struct MediaGenericCardCarousel : WaveMedia
  • Display an image from a URL. Will replace displaying images via Action.media in future.

    See more

    Declaration

    Swift

    public struct MediaImage : WaveMedia
  • A list of items to output in a UITableView-like view. Items are tappable and open a URL when tapped. Example json answer that includes a mediaAdvanced list: https://dev.api.wienbot.wave-ai.com/message?q=oper

    ...
          "mediaAdvanced": {
           "moreLinkTitle": "Mehr",
           "moreLink": "https://www.wien.gv.at/vadb/internet/AdvPrSrv.asp?Layout=VAErgebnis_neu&Type=R&NSatz=ja&hmwd=d&suchen=Suche+starten&WORT2=Oper&WORT1=Oper&suchbegriff=Oper&vie_range-from=22.02.2018&vie_range-to=22.02.2020",
           "type": "list",
           "items": [
             {
               "title": "PRATER STERN STUNDEN Ausstellung",
               "link": "https://www.wien.gv.at/vadb/internet/AdvPrSrv.asp?Layout=VAErgebnis_neu&Type=K&ID=455058&return=",
               "caption": "philomena+ Kunst- und Architekturplattform für Kooperationen zw. dem MENA-Raum (Naher Osten und Nordafrika) und Wien",
               "subTitle": "16.01.2018 - 26.01.2018"
             },
             {
               "title": "Brigittenauer Opernsoiree: \"La Cenerentola\"",
               "link": "https://www.wien.gv.at/vadb/internet/AdvPrSrv.asp?Layout=VAErgebnis_neu&Type=K&ID=446379&return=",
               "caption": "Amtshaus für den 20. Bezirk",
               "subTitle": "22.01.2018"
             },
             {
               "title": "La cenerentola von Gioachino Rossini ",
               "link": "https://www.wien.gv.at/vadb/internet/AdvPrSrv.asp?Layout=VAErgebnis_neu&Type=K&ID=445176&return=",
               "caption": "Wiener Staatsoper",
               "subTitle": "22.01.2018"
             },
             {
               "title": "Pelléas et Mélisande",
               "link": "https://www.wien.gv.at/vadb/internet/AdvPrSrv.asp?Layout=VAErgebnis_neu&Type=K&ID=452865&return=",
               "caption": "Wiener Kammeroper",
               "subTitle": "22.01.2018"
             }
           ]
         },
    
    ...
    
    See more

    Declaration

    Swift

    public struct MediaList : WaveMedia
  • Description of a single cell in a MediaList.

    See more

    Declaration

    Swift

    public struct MediaListItem : Codable
  • Display a Markdown preview that opens to a full screen markdown view.

    See more

    Declaration

    Swift

    public struct MediaMarkdown : WaveMedia
  • Display a web preview (like social clients do) of a web link. The web link is opened when tapped.

    See more

    Declaration

    Swift

    public struct MediaWebPreview : WaveMedia