Class: BitBucket::Client::Users::Account
- Defined in:
- lib/bitbucket_rest_api/client/users/account.rb
Constant Summary
Constants included from Validations
Constants included from Validations::Token
Validations::Token::TOKEN_REQUIRED, Validations::Token::TOKEN_REQUIRED_REGEXP
Constants included from BitBucket::Constants
BitBucket::Constants::ACCEPT, BitBucket::Constants::ACCEPT_CHARSET, BitBucket::Constants::CACHE_CONTROL, BitBucket::Constants::CONTENT_LENGTH, BitBucket::Constants::CONTENT_TYPE, BitBucket::Constants::DATE, BitBucket::Constants::ETAG, BitBucket::Constants::LOCATION, BitBucket::Constants::META_FIRST, BitBucket::Constants::META_LAST, BitBucket::Constants::META_NEXT, BitBucket::Constants::META_PREV, BitBucket::Constants::META_REL, BitBucket::Constants::PARAM_PAGE, BitBucket::Constants::PARAM_START_PAGE, BitBucket::Constants::QUERY_STR_SEP, BitBucket::Constants::RATELIMIT_LIMIT, BitBucket::Constants::RATELIMIT_REMAINING, BitBucket::Constants::SERVER, BitBucket::Constants::USER_AGENT
Instance Attribute Summary
Attributes inherited from API
Instance Method Summary collapse
-
#delete_key(accountname, key_id) ⇒ Object
DELETE a key.
-
#emails(accountname) ⇒ Object
GET the emails.
-
#events(accountname) ⇒ Object
GET the events.
-
#followers(accountname) ⇒ Object
GET the followers.
-
#keys(accountname) ⇒ Object
GET the keys.
-
#new_key(accountname, params) ⇒ Object
POST a new key params should be in format “”, label:“”.
-
#plan(accountname) ⇒ Object
GET the account plan.
-
#profile(accountname) ⇒ Object
GET the account profile.
Methods inherited from API
#_merge_user_into_params!, #_merge_user_repo_into_params!, #_update_user_repo_params, #api_methods_in, #append_arguments, #arguments, extract_class_name, inherited, #initialize, #method_missing, namespace, #process_basic_auth, #set, #set_api_client, #setup, #with, #yield_or_eval
Methods included from BitBucket::ClassMethods
#configuration, #configure, #require_all
Methods included from Normalizer
Methods included from ParameterFilter
Methods included from Validations::Required
Methods included from Validations::Token
Methods included from Validations::Format
Methods included from Validations::Presence
Methods included from Request::Verbs
#delete_request, #get_request, #options_request, #patch_request, #post_request, #put_request
Methods included from Authorization
#authenticated?, #authentication, #basic_authed?
Constructor Details
This class inherits a constructor from BitBucket::API
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BitBucket::API
Instance Method Details
#delete_key(accountname, key_id) ⇒ Object
DELETE a key
50 51 52 |
# File 'lib/bitbucket_rest_api/client/users/account.rb', line 50 def delete_key(accountname, key_id) response = delete_request("/users/#{accountname}/ssh-keys/#{key_id}") end |
#emails(accountname) ⇒ Object
GET the emails
24 25 26 |
# File 'lib/bitbucket_rest_api/client/users/account.rb', line 24 def emails(accountname) response = get_request("/users/#{accountname}/emails") end |
#events(accountname) ⇒ Object
GET the events
34 35 36 |
# File 'lib/bitbucket_rest_api/client/users/account.rb', line 34 def events(accountname) response = get_request("/users/#{accountname}/events") end |
#followers(accountname) ⇒ Object
GET the followers
29 30 31 |
# File 'lib/bitbucket_rest_api/client/users/account.rb', line 29 def followers(accountname) response = get_request("/users/#{accountname}/followers") end |
#keys(accountname) ⇒ Object
GET the keys
39 40 41 |
# File 'lib/bitbucket_rest_api/client/users/account.rb', line 39 def keys(accountname) response = get_request("/users/#{accountname}/ssh-keys") end |
#new_key(accountname, params) ⇒ Object
POST a new key params should be in format “”, label:“”
45 46 47 |
# File 'lib/bitbucket_rest_api/client/users/account.rb', line 45 def new_key(accountname, params) response = post_request("/users/#{accountname}/ssh-keys/", params) end |
#plan(accountname) ⇒ Object
GET the account plan
19 20 21 |
# File 'lib/bitbucket_rest_api/client/users/account.rb', line 19 def plan(accountname) response = get_request("/users/#{accountname}/plan") end |
#profile(accountname) ⇒ Object
GET the account profile
14 15 16 |
# File 'lib/bitbucket_rest_api/client/users/account.rb', line 14 def profile(accountname) response = get_request("/users/#{accountname}") end |