forked from jarvis2f/telegram-files
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest.http
More file actions
183 lines (146 loc) · 3.68 KB
/
request.http
File metadata and controls
183 lines (146 loc) · 3.68 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
### Get health
GET http://{{server}}/health
### Basic GET request test
GET http://{{server}}
Cookie: {{tf}}
> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
client.assert(response.body === "Hello World!", "Response body is not 'Hello World!'");
});
const cookie = response.headers.valueOf("set-cookie")
if (cookie) {
client.global.set("tf", cookie.split(";")[0])
console.log("tf: " + cookie)
}
%}
### Basic websocket test
WEBSOCKET ws://{{server}}/ws
===
Hello!
=== wait-for-server
### Create settings test
POST http://{{server}}/settings/create
Content-Type: application/json
Cookie: {{tf}}
{
"test1": "test1",
"test2": "test2",
"test3": "test3"
}
### Get settings
GET http://{{server}}/settings?keys=test1,test2,test3
Cookie: {{tf}}
### Get telegrams
GET http://{{server}}/telegrams
Cookie: {{tf}}
### Change telegrams
POST http://{{server}}/telegrams/change?telegramId={{telegramId}}
Content-Type: application/json
Cookie: {{tf}}
### Telegram Create test
POST http://{{server}}/telegram/create
Cookie: {{tf}}
### Ping
GET http://{{server}}/telegram/{{telegramId}}/ping
Cookie: {{tf}}
### Get chats
GET http://{{server}}/telegram/{{telegramId}}/chats
Cookie: {{tf}}
### Get chat files
GET http://{{server}}/telegram/{{telegramId}}/chat/{{chatId}}/files?fromMessageId=0&type=media&status=all
Cookie: {{tf}}
### Get download completed chat files
GET http://{{server}}/telegram/{{telegramId}}/chat/{{chatId}}/files?fromMessageId=0&type=media&status=completed
Cookie: {{tf}}
### Get chat files count
GET http://{{server}}/telegram/{{telegramId}}/chat/{{chatId}}/files/count
Cookie: {{tf}}
### Load photo preview
GET http://{{server}}//file/preview?chatId={{chatId}}&messageId={{messageId}}
Cookie: {{tf}}
### Get download statistics
GET http://{{server}}/telegram/{{telegramId}}/download-statistics?type=phase&timeRange=3
Cookie: {{tf}}
### Telegram api methods
GET http://{{server}}/telegram/api/methods
Cookie: {{tf}}
### Telegram api method parameters
GET http://{{server}}/telegram/api/GetChats/parameters
Cookie: {{tf}}
### Telegram GetMe
POST http://{{server}}/telegram/api/GetMe
Content-Type: application/json
Cookie: {{tf}}
{}
### Telegram SetAuthenticationPhoneNumber
POST http://{{server}}/telegram/api/SetAuthenticationPhoneNumber
Content-Type: application/json
Cookie: {{tf}}
{
"phoneNumber": "{{telegram_phone}}",
"settings": null
}
### Telegram CheckAuthenticationCode
POST http://{{server}}/telegram/api/CheckAuthenticationCode
Content-Type: application/json
Cookie: {{tf}}
{
"code": "52932"
}
### Telegram GetChats
POST http://{{server}}/telegram/api/GetChats
Content-Type: application/json
Cookie: {{tf}}
{
"chatList": {
"@type": -400991316
},
"limit": 10
}
### Telegram GetChat
POST http://{{server}}/telegram/api/GetChat
Content-Type: application/json
Cookie: {{tf}}
{
"chatId": {{chatId}}
}
### Telegram LoadChats
POST http://{{server}}/telegram/api/LoadChats
Content-Type: application/json
Cookie: {{tf}}
{
"chatList": {
"@type": -400991316
},
"limit": 10
}
### Telegram SearchChatsOnServer
POST http://{{server}}/telegram/api/SearchChatsOnServer
Content-Type: application/json
Cookie: {{tf}}
{
"query": "拾趣",
"limit": 10
}
### Telegram SearchChatMessages
POST http://{{server}}/telegram/api/SearchChatMessages
Content-Type: application/json
Cookie: {{tf}}
{
"chatId": 1,
"query": "",
"fromMessageId": 0,
"offset": 0,
"limit": 10,
"filter": {
"@type": 1352130963
}
}
### Telegram RequestQrCodeAuthentication
POST http://{{server}}/telegram/api/RequestQrCodeAuthentication
Content-Type: application/json
Cookie: {{tf}}
{
"otherUserIds": null
}