Module: BitBucket
- Extended by:
- ClassMethods
- Defined in:
- lib/bitbucket_rest_api/error/forbidden.rb,
lib/bitbucket_rest_api.rb,
lib/bitbucket_rest_api/api.rb,
lib/bitbucket_rest_api/error.rb,
lib/bitbucket_rest_api/users.rb,
lib/bitbucket_rest_api/client.rb,
lib/bitbucket_rest_api/result.rb,
lib/bitbucket_rest_api/request.rb,
lib/bitbucket_rest_api/version.rb,
lib/bitbucket_rest_api/response.rb,
lib/bitbucket_rest_api/constants.rb,
lib/bitbucket_rest_api/utils/url.rb,
lib/bitbucket_rest_api/api/config.rb,
lib/bitbucket_rest_api/connection.rb,
lib/bitbucket_rest_api/middleware.rb,
lib/bitbucket_rest_api/normalizer.rb,
lib/bitbucket_rest_api/page_links.rb,
lib/bitbucket_rest_api/pagination.rb,
lib/bitbucket_rest_api/api/actions.rb,
lib/bitbucket_rest_api/api/factory.rb,
lib/bitbucket_rest_api/client/user.rb,
lib/bitbucket_rest_api/deprecation.rb,
lib/bitbucket_rest_api/params_hash.rb,
lib/bitbucket_rest_api/validations.rb,
lib/bitbucket_rest_api/client/repos.rb,
lib/bitbucket_rest_api/client/users.rb,
lib/bitbucket_rest_api/null_encoder.rb,
lib/bitbucket_rest_api/api/arguments.rb,
lib/bitbucket_rest_api/authorization.rb,
lib/bitbucket_rest_api/client/issues.rb,
lib/bitbucket_rest_api/configuration.rb,
lib/bitbucket_rest_api/page_iterator.rb,
lib/bitbucket_rest_api/paged_request.rb,
lib/bitbucket_rest_api/request/oauth.rb,
lib/bitbucket_rest_api/request/verbs.rb,
lib/bitbucket_rest_api/error/not_found.rb,
lib/bitbucket_rest_api/request/jsonize.rb,
lib/bitbucket_rest_api/response/header.rb,
lib/bitbucket_rest_api/response/xmlize.rb,
lib/bitbucket_rest_api/parameter_filter.rb,
lib/bitbucket_rest_api/response/helpers.rb,
lib/bitbucket_rest_api/response/jsonize.rb,
lib/bitbucket_rest_api/response/mashify.rb,
lib/bitbucket_rest_api/response_wrapper.rb,
lib/bitbucket_rest_api/client/repos/keys.rb,
lib/bitbucket_rest_api/error/bad_request.rb,
lib/bitbucket_rest_api/error/validations.rb,
lib/bitbucket_rest_api/validations/token.rb,
lib/bitbucket_rest_api/client/invitations.rb,
lib/bitbucket_rest_api/error/client_error.rb,
lib/bitbucket_rest_api/error/unauthorized.rb,
lib/bitbucket_rest_api/request/basic_auth.rb,
lib/bitbucket_rest_api/validations/format.rb,
lib/bitbucket_rest_api/api/config/property.rb,
lib/bitbucket_rest_api/error/service_error.rb,
lib/bitbucket_rest_api/error/unknown_value.rb,
lib/bitbucket_rest_api/client/repos/sources.rb,
lib/bitbucket_rest_api/client/users/account.rb,
lib/bitbucket_rest_api/response/raise_error.rb,
lib/bitbucket_rest_api/validations/presence.rb,
lib/bitbucket_rest_api/validations/required.rb,
lib/bitbucket_rest_api/client/repos/services.rb,
lib/bitbucket_rest_api/core_ext/ordered_hash.rb,
lib/bitbucket_rest_api/error/invalid_options.rb,
lib/bitbucket_rest_api/error/required_params.rb,
lib/bitbucket_rest_api/client/issues/comments.rb,
lib/bitbucket_rest_api/client/repos/following.rb,
lib/bitbucket_rest_api/api/config/property_set.rb,
lib/bitbucket_rest_api/client/repos/changesets.rb,
lib/bitbucket_rest_api/client/issues/components.rb,
lib/bitbucket_rest_api/client/issues/milestones.rb,
lib/bitbucket_rest_api/error/service_unavailable.rb,
lib/bitbucket_rest_api/client/repos/pull_requests.rb,
lib/bitbucket_rest_api/error/unprocessable_entity.rb,
lib/bitbucket_rest_api/error/internal_server_error.rb,
lib/bitbucket_rest_api/client/repos/pull_requests/commits.rb,
lib/bitbucket_rest_api/client/repos/pull_requests/comments.rb
Overview
:nodoc
Defined Under Namespace
Modules: Authorization, ClassMethods, Connection, Constants, CoreExt, Error, Normalizer, NullParamsEncoder, PagedRequest, Pagination, ParameterFilter, Result, Utils, VERSION, Validations Classes: API, Client, Configuration, Middleware, PageIterator, PageLinks, ParamsHash, Request, Response, ResponseWrapper
Constant Summary collapse
- LIBNAME =
'bitbucket_rest_api'
- LIBDIR =
File.("../#{LIBNAME}", __FILE__)
- DEPRECATION_PREFIX =
"[BitBucketAPI] Deprecation warning:"
Class Attribute Summary collapse
-
.api_client ⇒ Object
Handle for the client instance.
- .deprecation_tracker ⇒ Object
Class Method Summary collapse
-
.default_middleware(options = {}) ⇒ Proc
private
Default middleware stack that uses default adapter as specified by configuration setup.
-
.deprecate(method, alternate_method = nil) ⇒ Object
Displays deprecation message to the user.
- .included(base) ⇒ Object
-
.method_missing(method, *args, &block) ⇒ Object
Delegate to BitBucket::Client.
-
.new(options = { }, &block) ⇒ BitBucket::Client
Alias for BitBucket::Client.new.
- .respond_to?(method, include_private = false) ⇒ Boolean
- .warn_deprecation(message) ⇒ Object
Methods included from ClassMethods
configuration, configure, require_all
Class Attribute Details
.api_client ⇒ Object
Handle for the client instance
26 27 28 |
# File 'lib/bitbucket_rest_api.rb', line 26 def api_client @api_client end |
.deprecation_tracker ⇒ Object
11 12 13 |
# File 'lib/bitbucket_rest_api/deprecation.rb', line 11 def deprecation_tracker @deprecation_tracker ||= [] end |
Class Method Details
.default_middleware(options = {}) ⇒ Proc
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Default middleware stack that uses default adapter as specified by configuration setup
41 42 43 |
# File 'lib/bitbucket_rest_api.rb', line 41 def default_middleware( = {}) Middleware.default() end |
.deprecate(method, alternate_method = nil) ⇒ Object
Displays deprecation message to the user. Each message is printed once.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/bitbucket_rest_api/deprecation.rb', line 17 def deprecate(method, alternate_method=nil) return if deprecation_tracker.include? method deprecation_tracker << method = <<-NOTICE #{DEPRECATION_PREFIX} * #{method} is deprecated. NOTICE if alternate_method << <<-ADDITIONAL * please use #{alternate_method} instead. ADDITIONAL end warn_deprecation() end |
.included(base) ⇒ Object
21 22 23 |
# File 'lib/bitbucket_rest_api.rb', line 21 def included(base) base.extend ClassMethods end |
.method_missing(method, *args, &block) ⇒ Object
Delegate to BitBucket::Client
47 48 49 50 |
# File 'lib/bitbucket_rest_api.rb', line 47 def method_missing(method, *args, &block) return super unless new.respond_to?(method) new.send(method, *args, &block) end |
.new(options = { }, &block) ⇒ BitBucket::Client
Alias for BitBucket::Client.new
31 32 33 |
# File 'lib/bitbucket_rest_api.rb', line 31 def new( = { }, &block) @api_client = Client.new(, &block) end |
.respond_to?(method, include_private = false) ⇒ Boolean
52 53 54 |
# File 'lib/bitbucket_rest_api.rb', line 52 def respond_to?(method, include_private = false) new.respond_to?(method, include_private) || super(method, include_private) end |
.warn_deprecation(message) ⇒ Object
34 35 36 |
# File 'lib/bitbucket_rest_api/deprecation.rb', line 34 def warn_deprecation() send :warn, end |