-
Notifications
You must be signed in to change notification settings - Fork 0
/
team_paths.go
71 lines (69 loc) · 2.15 KB
/
team_paths.go
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
package api_paths
import "github.com/tada-team/tdproto"
var TeamPaths = []PathSpec{
{
Path: "/api/v4/teams",
Get: &OperationSpec{
Response: []tdproto.Team{},
Description: "Get the list of teams on the server.",
},
Post: &OperationSpec{
Request: tdproto.Team{},
Response: tdproto.Team{},
Description: "Create new team.",
RequestDescription: ":tdproto:ref:`Team` object with fields of new team.",
ResponseDescription: ":tdproto:ref:`Team` of new team.",
},
},
{
Path: "/api/v4/teams/{team_id}",
Get: &OperationSpec{
Response: tdproto.Team{},
Description: "Get team info.",
},
Put: &OperationSpec{
Request: tdproto.Team{},
Response: tdproto.Team{},
Description: []string{"Update team settings.", "Must have admin rights."},
RequestDescription: ":tdproto:ref:`Team` object with updated fields.",
ResponseDescription: "Updated :tdproto:ref:`Team` object of the team.",
},
Delete: &OperationSpec{
Response: tdproto.Team{},
ResponseDescription: ":tdproto:ref:`Team` object of deleted team.",
Description: []string{"Delete the team.", "Must have admin rights."},
},
},
{
Path: "/api/v4/teams/{team_id}/chats",
Get: &OperationSpec{
Response: []tdproto.Chat{},
Description: "Get the list of chats in the team.",
},
},
{
Path: "/api/v4/teams/{team_id}/contacts",
Get: &OperationSpec{
Response: []tdproto.Contact{},
Description: "Get the list of contacts of the team.",
},
},
{
Path: "/api/v4/teams/{team_id}/contacts/{contact_id}",
Get: &OperationSpec{
Response: tdproto.Contact{},
Description: "Get contact details.",
},
Post: &OperationSpec{
Request: tdproto.Contact{},
Response: tdproto.Contact{},
Description: "Update contact details.",
ResponseDescription: "Updated :tdproto:ref:`Contact` object.",
},
Delete: &OperationSpec{
Response: tdproto.Contact{},
Description: []string{"Remove contact from the team.", "Must have admin rights."},
ResponseDescription: "Removed :tdproto:ref:`Contact` object.",
},
},
}