Class: BitBucket::Users::Account
- Defined in:
- lib/bitbucket_rest_api/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 Request
Request::METHODS, Request::METHODS_WITH_BODIES
Constants included from Connection
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_mime_type, #_merge_user_into_params!, #_merge_user_repo_into_params!, #_update_user_repo_params, #api_methods_in, inherited, #initialize, #method_missing, #process_basic_auth, #set_api_client, #setup, #update_and_validate_user_repo_params
Methods included from Normalizer
Methods included from ParameterFilter
Methods included from AutoloadHelper
#autoload_all, #lookup_constant, #register_constant
Methods included from Validations::Required
#assert_required_keys, #assert_required_values_present, #parse_values
Methods included from Validations::Token
Methods included from Validations::Format
Methods included from Validations::Presence
#_validate_presence_of, #_validate_user_repo_params
Methods included from Request
#delete_request, #get_request, #patch_request, #post_request, #put_request, #request
Methods included from Connection
caching?, clear_cache, connection, default_middleware, default_options, stack
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
46 47 48 |
# File 'lib/bitbucket_rest_api/users/account.rb', line 46 def delete_key(accountname, key_id) response = delete_request("/1.0/users/#{accountname}/ssh-keys/#{key_id}") end |
#emails(accountname) ⇒ Object
GET the emails
20 21 22 |
# File 'lib/bitbucket_rest_api/users/account.rb', line 20 def emails(accountname) response = get_request("/1.0/users/#{accountname}/emails") end |
#events(accountname) ⇒ Object
GET the events
30 31 32 |
# File 'lib/bitbucket_rest_api/users/account.rb', line 30 def events(accountname) response = get_request("/1.0/users/#{accountname}/events") end |
#followers(accountname) ⇒ Object
GET the followers
25 26 27 |
# File 'lib/bitbucket_rest_api/users/account.rb', line 25 def followers(accountname) response = get_request("/1.0/users/#{accountname}/followers") end |
#keys(accountname) ⇒ Object
GET the keys
35 36 37 |
# File 'lib/bitbucket_rest_api/users/account.rb', line 35 def keys(accountname) response = get_request("/1.0/users/#{accountname}/ssh-keys") end |
#new_key(accountname, params) ⇒ Object
POST a new key params should be in format “”, label:“”
41 42 43 |
# File 'lib/bitbucket_rest_api/users/account.rb', line 41 def new_key(accountname, params) response = post_request("/1.0/users/#{accountname}/ssh-keys/", params) end |
#plan(accountname) ⇒ Object
GET the account plan
15 16 17 |
# File 'lib/bitbucket_rest_api/users/account.rb', line 15 def plan(accountname) response = get_request("/1.0/users/#{accountname}/plan") end |
#profile(accountname) ⇒ Object
GET the account profile
10 11 12 |
# File 'lib/bitbucket_rest_api/users/account.rb', line 10 def profile(accountname) response = get_request("/1.0/users/#{accountname}") end |