Sha256: cfdaf9008ba2e5f0c7b3b23e0a7f7be8be6e9bcf8604ef9d85339d3f50dfb20d

Contents?: true

Size: 1.3 KB

Versions: 6

Compression:

Stored size: 1.3 KB

Contents

# encoding: utf-8

module BitBucket
  class Users::Account < API

    # 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("/1.0/users/#{accountname}")
    end

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

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

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

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

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

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

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

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
zz_bitbucket_rest_api-0.1.11 lib/bitbucket_rest_api/users/account.rb
zz_bitbucket_rest_api-0.1.10 lib/bitbucket_rest_api/users/account.rb
zz_bitbucket_rest_api-0.1.9 lib/bitbucket_rest_api/users/account.rb
zz_bitbucket_rest_api-0.1.8 lib/bitbucket_rest_api/users/account.rb
bitbucket_rest_api2-0.9.5 lib/bitbucket_rest_api/users/account.rb
bitbucket_rest_api-0.1.7 lib/bitbucket_rest_api/users/account.rb