|
@@ -0,0 +1,89 @@
|
|
1
|
+FORMAT: 1A
|
|
2
|
+
|
|
3
|
+# IRC API
|
|
4
|
+
|
|
5
|
+A simplified RESTful API for interacting with persistent Internet Relay Chat connections.
|
|
6
|
+
|
|
7
|
+# Group Networks
|
|
8
|
+
|
|
9
|
+A "network" represents a user-defined connection to IRC. Each network has one or more IRC
|
|
10
|
+servers to which the API will connect.
|
|
11
|
+
|
|
12
|
+## Networks collection [/networks]
|
|
13
|
+### List existing networks [GET]
|
|
14
|
++ Response 200 (application/json)
|
|
15
|
+### Add a new network [POST]
|
|
16
|
++ Response 204
|
|
17
|
++ Response 400
|
|
18
|
+
|
|
19
|
+## Network information [/networks/{network}]
|
|
20
|
+### Get network information [GET]
|
|
21
|
++ Parameters
|
|
22
|
+ + network: `quakenet` (string) - The name of the network.
|
|
23
|
++ Response 200 (application/json)
|
|
24
|
++ Response 404
|
|
25
|
+### Update network information [POST]
|
|
26
|
++ Parameters
|
|
27
|
+ + network: `quakenet` (string) - The name of the network.
|
|
28
|
++ Response 204
|
|
29
|
++ Response 400
|
|
30
|
++ Response 404
|
|
31
|
+### Delete network [DELETE]
|
|
32
|
++ Parameters
|
|
33
|
+ + network: `quakenet` (string) - The name of the network.
|
|
34
|
++ Response 204
|
|
35
|
++ Response 404
|
|
36
|
+
|
|
37
|
+# Group Chats
|
|
38
|
+
|
|
39
|
+A chat represents either an IRC channel or a private message with another IRC user.
|
|
40
|
+
|
|
41
|
+## Chats collection [/networks/{network}/chats]
|
|
42
|
+### List existing chats [GET]
|
|
43
|
++ Parameters
|
|
44
|
+ + network: `quakenet` (string) - The name of the network.
|
|
45
|
++ Response 200 (application/json)
|
|
46
|
++ Response 404
|
|
47
|
+### Create new chat [POST]
|
|
48
|
++ Parameters
|
|
49
|
+ + network: `quakenet` (string) - The name of the network.
|
|
50
|
++ Response 200 (application/json)
|
|
51
|
++ Response 400
|
|
52
|
++ Response 404
|
|
53
|
+
|
|
54
|
+## Chat information [/networks/{network}/chats/{chat}]
|
|
55
|
+### Get chat information [GET]
|
|
56
|
++ Parameters
|
|
57
|
+ + network: `quakenet` (string) - The name of the network.
|
|
58
|
+ + chat: `dmdirc` (string) - The name of the chat.
|
|
59
|
++ Response 200 (application/json)
|
|
60
|
++ Response 404
|
|
61
|
+### Delete chat [DELETE]
|
|
62
|
++ Parameters
|
|
63
|
+ + network: `quakenet` (string) - The name of the network.
|
|
64
|
+ + chat: `dmdirc` (string) - The name of the chat.
|
|
65
|
++ Response 204
|
|
66
|
++ Response 404
|
|
67
|
+
|
|
68
|
+## Chat messages [/networks/{network}/chats/{chat}/messages]
|
|
69
|
+### Get chat messages [GET]
|
|
70
|
++ Parameters
|
|
71
|
+ + network: `quakenet` (string) - The name of the network.
|
|
72
|
+ + chat: `dmdirc` (string) - The name of the chat.
|
|
73
|
++ Response 200 (application/json)
|
|
74
|
++ Response 404
|
|
75
|
+### Send chat message [POST]
|
|
76
|
++ Parameters
|
|
77
|
+ + network: `quakenet` (string) - The name of the network.
|
|
78
|
+ + chat: `dmdirc` (string) - The name of the chat.
|
|
79
|
++ Response 200 (application/json)
|
|
80
|
++ Response 400
|
|
81
|
++ Response 404
|
|
82
|
+
|
|
83
|
+## Chat users [/networks/{network}/chats/{chat}/users]
|
|
84
|
+### List chat users [GET]
|
|
85
|
++ Parameters
|
|
86
|
+ + network: `quakenet` (string) - The name of the network.
|
|
87
|
+ + chat: `dmdirc` (string) - The name of the chat.
|
|
88
|
++ Response 200 (application/json)
|
|
89
|
++ Response 404
|