Class: Nautilfer::Adapters::Teams

Inherits:
Base
  • Object
show all
Defined in:
lib/nautilfer/adapters/teams.rb

Instance Method Summary collapse

Methods inherited from Base

#body, #headers

Instance Method Details

#payload(message) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/nautilfer/adapters/teams.rb', line 8

def payload(message)
  {
    "attachments": [
      {
        "contentType": "application/vnd.microsoft.card.adaptive",
        "content": {
          "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
          "type": "AdaptiveCard",
          "version": "1.2",
          "body": [
            {
              "type": "TextBlock",
              "text": message,
              "wrap": true,
              "markdown": true
            }
          ]
        }
      }
    ]
  }
end