class BitBucket::User

Constants

DEFAULT_USER_OPTIONS

Public Class Methods

new(options = { }) click to toggle source

Creates new User API

Calls superclass method BitBucket::API::new
# File lib/bitbucket_rest_api/user.rb, line 16
def initialize(options = { })
  super(options)
end

Public Instance Methods

dashboard() click to toggle source

GET the list of repositories on the dashboard Gets the repositories list from the account's dashboard.

# File lib/bitbucket_rest_api/user.rb, line 96
def dashboard
  get_request("/1.0/user/repositories/dashboard")
end
follows() click to toggle source

GET a list of repositories an account follows Gets the details of the repositories that the individual or team account follows. This call returns the full data about the repositories including if the repository is a fork of another repository. An account always “follows” its own repositories.

# File lib/bitbucket_rest_api/user.rb, line 68
def follows
  get_request("/1.0/user/follows")
end
overview() click to toggle source

GET a list of repositories the account is following Gets a list of the repositories the account follows. This is the same list that appears on the Following tab on your account dashboard.

# File lib/bitbucket_rest_api/user.rb, line 88
def overview
  get_request("/1.0/user/repositories/overview")
end
privileges() click to toggle source

GET a list of user privileges

# File lib/bitbucket_rest_api/user.rb, line 57
def privileges
  get_request("/1.0/user/privileges")
end
profile() click to toggle source

Gets the basic information associated with an account and a list of all of the repositories owned by the user. See confluence.atlassian.com/display/BITBUCKET/user+Endpoint#userEndpoint-GETauserprofile

Examples

bitbucket = BitBucket.new
bitbucket.user_api.profile
# File lib/bitbucket_rest_api/user.rb, line 28
def profile
  get_request("/1.0/user")
end
repos()
Alias for: repositories
repositories() click to toggle source

GET a list of repositories visible to an account Gets the details of the repositories that the user owns or has at least read access to. Use this if you're looking for a full list of all of the repositories associated with a user.

# File lib/bitbucket_rest_api/user.rb, line 77
def repositories
  get_request("/1.0/user/repositories")
end
Also aliased as: repos
update( params={ }) click to toggle source

Parameters

  • :first_name Optional string

  • :last_name Optional string

  • :avatar Optional string

  • :resource_uri Optional string

Examples

bitbucket = BitBucket.new
bitbucket.user_api.update :first_name => 'first-name', :last_name => 'last-name'
# File lib/bitbucket_rest_api/user.rb, line 47
def update( params={ })
  normalize! params
  filter! DEFAULT_USER_OPTIONS, params

  put_request("/1.0/user", DEFAULT_USER_OPTIONS.merge(params))

end