Sha256: 0d7004f4db9ed4a352576951d0094c053a3565134cd580943b72f6c8bc6bec97

Contents?: true

Size: 1.3 KB

Versions: 5

Compression:

Stored size: 1.3 KB

Contents

# encoding: utf-8

module BitBucket
  class Client::Users::Account < API
    @version = '1.0'

    # API about users/account , please refer to 
    # https://confluence.atlassian.com/display/BITBUCKET/account+Resource
    #  


    # GET the account profile
    # 
    def profile(accountname)
      response = get_request("/users/#{accountname}")
    end

    # GET the account plan
    def plan(accountname)
      response = get_request("/users/#{accountname}/plan")
    end

    # GET the emails
    def emails(accountname)
      response = get_request("/users/#{accountname}/emails")
    end

    # GET the followers
    def followers(accountname)
      response = get_request("/users/#{accountname}/followers")
    end

    # GET the events
    def events(accountname)
      response = get_request("/users/#{accountname}/events")
    end

    #GET the keys
    def keys(accountname)
      response = get_request("/users/#{accountname}/ssh-keys")
    end

    #POST a new key
    # params should be in format {key: "", label:""}
    def new_key(accountname, params)
      response = post_request("/users/#{accountname}/ssh-keys/", params)
    end

    #DELETE a key
    def delete_key(accountname, key_id)
      response = delete_request("/users/#{accountname}/ssh-keys/#{key_id}")
    end
  end # Users::Account
end # BitBucket

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
codenamev_bitbucket_api-0.4.1 lib/bitbucket_rest_api/client/users/account.rb
codenamev_bitbucket_api-0.4.0 lib/bitbucket_rest_api/client/users/account.rb
reenhanced_bitbucket_api-0.3.2 lib/bitbucket_rest_api/client/users/account.rb
reenhanced_bitbucket_api-0.3.1 lib/bitbucket_rest_api/client/users/account.rb
reenhanced_bitbucket_api-0.3.0 lib/bitbucket_rest_api/client/users/account.rb