ghorg/vendor/github.com/ktrysmt/go-bitbucket/users.go
dependabot[bot] fe846062e4
Bump github.com/ktrysmt/go-bitbucket from 0.9.80 to 0.9.81 (#469)
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>
2024-11-01 08:34:02 -07:00

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, "")
}