-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSlackAPI.csx
45 lines (42 loc) · 1.05 KB
/
SlackAPI.csx
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
#r "Newtonsoft.Json"
#r "Microsoft.WindowsAzure.Storage"
using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Xml;
using Newtonsoft.Json;
// ******************************************************
// リクエスト
public class Request
{
public string token { get; set; }
public string challenge { get; set; }
public string type { get; set; }
public Event @event { get; set; }
}
public class Event
{
public string type { get; set; }
public string file_id { get; set; }
}
public class File
{
public string filetype { get; set; }
public string url_private { get; set; }
public string permalink_public { get; set; }
}
public class FileResponse
{
public bool ok { get; set; }
public File file { get; set; }
}
// ******************************************************
// ******************************************************
// レスポンス
public class Payload
{
public string text { get; set; }
}
// ******************************************************