mirror of
https://github.com/gabrie30/ghorg.git
synced 2025-08-10 08:17:10 +02:00
Bumps [github.com/ktrysmt/go-bitbucket](https://github.com/ktrysmt/go-bitbucket) from 0.9.80 to 0.9.81. - [Release notes](https://github.com/ktrysmt/go-bitbucket/releases) - [Commits](https://github.com/ktrysmt/go-bitbucket/compare/v0.9.80...v0.9.81) --- updated-dependencies: - dependency-name: github.com/ktrysmt/go-bitbucket dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: gabrie30 <gabrie30@users.noreply.github.com>
34 lines
799 B
Go
34 lines
799 B
Go
package bitbucket
|
|
|
|
type Users struct {
|
|
c *Client
|
|
SSHKeys *SSHKeys
|
|
users
|
|
}
|
|
|
|
func (u *Users) Get(t string) (*User, error) {
|
|
urlStr := u.c.GetApiBaseURL() + "/users/" + t + "/"
|
|
response, err := u.c.execute("GET", urlStr, "")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return decodeUser(response)
|
|
}
|
|
|
|
func (u *Users) Followers(t string) (interface{}, error) {
|
|
|
|
urlStr := u.c.GetApiBaseURL() + "/users/" + t + "/followers"
|
|
return u.c.execute("GET", urlStr, "")
|
|
}
|
|
|
|
func (u *Users) Following(t string) (interface{}, error) {
|
|
|
|
urlStr := u.c.GetApiBaseURL() + "/users/" + t + "/following"
|
|
return u.c.execute("GET", urlStr, "")
|
|
}
|
|
func (u *Users) Repositories(t string) (interface{}, error) {
|
|
|
|
urlStr := u.c.GetApiBaseURL() + "/users/" + t + "/repositories"
|
|
return u.c.execute("GET", urlStr, "")
|
|
}
|