forked from ktrysmt/go-bitbucket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
teams.go
41 lines (32 loc) · 1.18 KB
/
teams.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
package bitbucket
type Teams struct {
c *Client
}
func (t *Teams) List(role string) (interface{}, error) {
urlStr := t.c.requestUrl("/teams/?role=%s", role)
return t.c.execute("GET", urlStr, "")
}
func (t *Teams) Profile(teamname string) (interface{}, error) {
urlStr := t.c.requestUrl("/teams/%s/", teamname)
return t.c.execute("GET", urlStr, "")
}
func (t *Teams) Members(teamname string) (interface{}, error) {
urlStr := t.c.requestUrl("/teams/%s/members", teamname)
return t.c.execute("GET", urlStr, "")
}
func (t *Teams) Followers(teamname string) (interface{}, error) {
urlStr := t.c.requestUrl("/teams/%s/followers", teamname)
return t.c.execute("GET", urlStr, "")
}
func (t *Teams) Following(teamname string) (interface{}, error) {
urlStr := t.c.requestUrl("/teams/%s/following", teamname)
return t.c.execute("GET", urlStr, "")
}
func (t *Teams) Repositories(teamname string) (interface{}, error) {
urlStr := t.c.requestUrl("/teams/%s/repositories", teamname)
return t.c.execute("GET", urlStr, "")
}
func (t *Teams) Projects(teamname string) (interface{}, error) {
urlStr := t.c.requestUrl("/teams/%s/projects/", teamname)
return t.c.execute("GET", urlStr, "")
}