Module: Github

Extended by:
AutoloadHelper, Configuration
Defined in:
lib/github_api/error/forbidden.rb,
lib/github_api.rb,
lib/github_api/say.rb,
lib/github_api/api.rb,
lib/github_api/orgs.rb,
lib/github_api/meta.rb,
lib/github_api/gists.rb,
lib/github_api/users.rb,
lib/github_api/error.rb,
lib/github_api/repos.rb,
lib/github_api/client.rb,
lib/github_api/emojis.rb,
lib/github_api/issues.rb,
lib/github_api/search.rb,
lib/github_api/scopes.rb,
lib/github_api/version.rb,
lib/github_api/request.rb,
lib/github_api/markdown.rb,
lib/github_api/git_data.rb,
lib/github_api/jsonable.rb,
lib/github_api/response.rb,
lib/github_api/activity.rb,
lib/github_api/arguments.rb,
lib/github_api/constants.rb,
lib/github_api/utils/url.rb,
lib/github_api/mime_type.rb,
lib/github_api/gitignore.rb,
lib/github_api/orgs/teams.rb,
lib/github_api/pagination.rb,
lib/github_api/rate_limit.rb,
lib/github_api/normalizer.rb,
lib/github_api/repos/keys.rb,
lib/github_api/connection.rb,
lib/github_api/page_links.rb,
lib/github_api/users/keys.rb,
lib/github_api/api/actions.rb,
lib/github_api/validations.rb,
lib/github_api/repos/forks.rb,
lib/github_api/s3_uploader.rb,
lib/github_api/repos/hooks.rb,
lib/github_api/api_factory.rb,
lib/github_api/deprecation.rb,
lib/github_api/params_hash.rb,
lib/github_api/descendants.rb,
lib/github_api/orgs/members.rb,
lib/github_api/users/emails.rb,
lib/github_api/configuration.rb,
lib/github_api/page_iterator.rb,
lib/github_api/issues/labels.rb,
lib/github_api/git_data/tags.rb,
lib/github_api/paged_request.rb,
lib/github_api/issues/events.rb,
lib/github_api/pull_requests.rb,
lib/github_api/authorization.rb,
lib/github_api/repos/merging.rb,
lib/github_api/repos/commits.rb,
lib/github_api/authorizations.rb,
lib/github_api/gists/comments.rb,
lib/github_api/repos/statuses.rb,
lib/github_api/request/oauth2.rb,
lib/github_api/repos/contents.rb,
lib/github_api/repos/comments.rb,
lib/github_api/git_data/blobs.rb,
lib/github_api/git_data/trees.rb,
lib/github_api/response/header.rb,
lib/github_api/request/jsonize.rb,
lib/github_api/repos/downloads.rb,
lib/github_api/response/xmlize.rb,
lib/github_api/issues/comments.rb,
lib/github_api/activity/events.rb,
lib/github_api/users/followers.rb,
lib/github_api/error/not_found.rb,
lib/github_api/git_data/commits.rb,
lib/github_api/parameter_filter.rb,
lib/github_api/issues/assignees.rb,
lib/github_api/response/jsonize.rb,
lib/github_api/response/mashify.rb,
lib/github_api/response_wrapper.rb,
lib/github_api/repos/statistics.rb,
lib/github_api/activity/starring.rb,
lib/github_api/activity/watching.rb,
lib/github_api/error/validations.rb,
lib/github_api/issues/milestones.rb,
lib/github_api/error/bad_request.rb,
lib/github_api/validations/token.rb,
lib/github_api/error/unauthorized.rb,
lib/github_api/validations/format.rb,
lib/github_api/request/basic_auth.rb,
lib/github_api/error/client_error.rb,
lib/github_api/error/service_error.rb,
lib/github_api/repos/collaborators.rb,
lib/github_api/git_data/references.rb,
lib/github_api/error/unknown_value.rb,
lib/github_api/repos/pub_sub_hubbub.rb,
lib/github_api/validations/required.rb,
lib/github_api/response/raise_error.rb,
lib/github_api/error/not_acceptable.rb,
lib/github_api/validations/presence.rb,
lib/github_api/error/invalid_options.rb,
lib/github_api/core_ext/ordered_hash.rb,
lib/github_api/error/required_params.rb,
lib/github_api/activity/notifications.rb,
lib/github_api/pull_requests/comments.rb,
lib/github_api/error/service_unavailable.rb,
lib/github_api/error/unprocessable_entity.rb,
lib/github_api/error/internal_server_error.rb

Overview

:nodoc

Defined Under Namespace

Modules: Authorization, AutoloadHelper, Configuration, Connection, Constants, CoreExt, Descendants, Error, Jsonable, MimeType, Normalizer, PagedRequest, Pagination, ParameterFilter, RateLimit, Request, Utils, VERSION, Validations Classes: API, Activity, ApiFactory, Arguments, Authorizations, Client, Emojis, Gists, GitData, Gitignore, Issues, Markdown, Meta, Orgs, PageIterator, PageLinks, ParamsHash, PullRequests, Repos, Response, ResponseWrapper, S3Uploader, Say, Scopes, Search, Users

Constant Summary

DEPRECATION_PREFIX =
"[GithubAPI] Deprecation warning:"

Constants included from Configuration

Configuration::DEFAULT_ADAPTER, Configuration::DEFAULT_AUTO_PAGINATION, Configuration::DEFAULT_BASIC_AUTH, Configuration::DEFAULT_CLIENT_ID, Configuration::DEFAULT_CLIENT_SECRET, Configuration::DEFAULT_CONNECTION_OPTIONS, Configuration::DEFAULT_ENDPOINT, Configuration::DEFAULT_LOGIN, Configuration::DEFAULT_MIME_TYPE, Configuration::DEFAULT_OAUTH_TOKEN, Configuration::DEFAULT_ORG, Configuration::DEFAULT_PASSWORD, Configuration::DEFAULT_REPO, Configuration::DEFAULT_SITE, Configuration::DEFAULT_SSL, Configuration::DEFAULT_USER, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS

Class Attribute Summary (collapse)

Class Method Summary (collapse)

Methods included from AutoloadHelper

autoload_all, lookup_constant, register_constant

Methods included from Configuration

configure, extended, keys, options, reset!

Class Attribute Details

+ (Object) deprecation_tracker



11
12
13
# File 'lib/github_api/deprecation.rb', line 11

def deprecation_tracker
  @deprecation_tracker ||= []
end

Class Method Details

+ (Object) deprecate(method, alternate_method = nil)

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/github_api/deprecation.rb', line 17

def deprecate(method, alternate_method=nil)
  return if deprecation_tracker.include? method
  deprecation_tracker << method

  message = <<-NOTICE
#{DEPRECATION_PREFIX}

* #{method} is deprecated.
NOTICE
  if alternate_method
    message << <<-ADDITIONAL
* please use #{alternate_method} instead.
ADDITIONAL
  end
  warn_deprecation(message)
end

+ (Object) method_missing(method, *args, &block)

Delegate to Github::Client



26
27
28
29
# File 'lib/github_api.rb', line 26

def method_missing(method, *args, &block)
  return super unless new.respond_to?(method)
  new.send(method, *args, &block)
end

+ (Github::Client) new(options = {}, &block)

Alias for Github::Client.new

Returns:



20
21
22
# File 'lib/github_api.rb', line 20

def new(options = {}, &block)
  Github::Client.new(options, &block)
end

+ (Boolean) respond_to?(method, include_private = false)

Returns:

  • (Boolean)


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

def respond_to?(method, include_private = false)
  new.respond_to?(method, include_private) || super(method, include_private)
end

+ (Object) warn_deprecation(message)



34
35
36
# File 'lib/github_api/deprecation.rb', line 34

def warn_deprecation(message)
  send :warn, message
end