Class: BitBucket::Client

Inherits:
API
  • Object
show all
Defined in:
lib/bitbucket_rest_api/client.rb

Constant Summary

Constants included from Validations

Validations::VALID_API_KEYS

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

BitBucket::Connection::ALLOWED_OPTIONS

Constants included from 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::HEADER_LAST, BitBucket::Constants::HEADER_LINK, BitBucket::Constants::HEADER_NEXT, 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_PER_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 Method Summary collapse

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

#normalize!

Methods included from ParameterFilter

#filter!

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

#validates_token_for

Methods included from Validations::Format

#assert_valid_values

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

#events(options = {}) ⇒ Object

This is a read-only API to the BitBucket events. These events power the various activity streams on the site.



8
9
10
11
# File 'lib/bitbucket_rest_api/client.rb', line 8

def events(options = {})
  raise "Unimplemented"
  #@events ||= ApiFactory.new 'Events', options
end

#invitations(options = {}) ⇒ Object



51
52
53
# File 'lib/bitbucket_rest_api/client.rb', line 51

def invitations(options = {})
  @invitations ||= ApiFactory.new "Invitations", options
end

#issues(options = {}) ⇒ Object



13
14
15
# File 'lib/bitbucket_rest_api/client.rb', line 13

def issues(options = {})
  @issues ||= ApiFactory.new 'Issues', options
end

#oauth(options = {}) ⇒ Object Also known as: authorizations

An API for users to manage their own tokens.



18
19
20
# File 'lib/bitbucket_rest_api/client.rb', line 18

def oauth(options = {})
  @oauth ||= ApiFactory.new 'Request::OAuth', options
end

#pull_requests(options = {}) ⇒ Object



27
28
29
# File 'lib/bitbucket_rest_api/client.rb', line 27

def pull_requests(options = {})
  @pull_requests ||= ApiFactory.new 'Repos::PullRequest', options
end

#repos(options = {}) ⇒ Object Also known as: repositories



31
32
33
# File 'lib/bitbucket_rest_api/client.rb', line 31

def repos(options = {})
  @repos ||= ApiFactory.new 'Repos', options
end

#search(options = {}) ⇒ Object



36
37
38
39
# File 'lib/bitbucket_rest_api/client.rb', line 36

def search(options = {})
  raise "Unimplemented"
  #@search ||= ApiFactory.new 'Search', options
end

#teams(options = {}) ⇒ Object



23
24
25
# File 'lib/bitbucket_rest_api/client.rb', line 23

def teams(options = {})
  @teams ||= ApiFactory.new 'Teams', options
end

#user_api(options = {}) ⇒ Object



47
48
49
# File 'lib/bitbucket_rest_api/client.rb', line 47

def user_api(options = {})
  @user_api ||= ApiFactory.new 'User', options
end

#users(options = {}) ⇒ Object

Many of the resources on the users API provide a shortcut for getting information about the currently authenticated user.



43
44
45
# File 'lib/bitbucket_rest_api/client.rb', line 43

def users(options = {})
  @users ||= ApiFactory.new 'Users', options
end