forked from Inumedia/SlackAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttachment.cs
More file actions
53 lines (49 loc) · 1.37 KB
/
Attachment.cs
File metadata and controls
53 lines (49 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
namespace SlackAPI
{
//See: https://api.slack.com/docs/attachments
public class Attachment
{
public string fallback;
public string color;
public string pretext;
public string author_name;
public string author_link;
public string author_icon;
public string title;
public string title_link;
public string text;
public Field[] fields;
public string image_url;
public string thumb_url;
public string[] mrkdwn_in;
public AttachmentAction[] actions;
}
public class Field{
public string title;
public string value;
public bool @short;
}
//See: https://api.slack.com/docs/message-buttons#action_fields
public class AttachmentAction
{
public AttachmentAction(string name, string text)
{
this.name = name;
this.text = text;
}
public string name { get; }
public string text { get; }
public string style;
public string type = "button";
public string value;
public ActionConfirm confirm;
}
//see: https://api.slack.com/docs/message-buttons#confirmation_fields
public class ActionConfirm
{
public string title;
public string text;
public string ok_text;
public string dismiss_text;
}
}