Module: Octokit
Overview
Ruby toolkit for the GitHub API
Constant Summary
-
MAJOR =
Current major release.
9
-
MINOR =
Current minor release.
2
-
PATCH =
Current patch level.
0
-
RATE_LIMITED_ERRORS =
# File 'lib/octokit/error.rb', line 368[Octokit::TooManyRequests, Octokit::AbuseDetected].freeze
-
VERSION =
Full release version.
[MAJOR, MINOR, PATCH].join('.').freeze
Class Attribute Summary
Configurable
- Extended
Class Method Summary
-
.client ⇒ Octokit::Client
API client based on configured options
Configurable
-
.enterprise_admin_client ⇒ Octokit::EnterpriseAdminClient
EnterpriseAdminClient
client based on configured optionsConfigurable
-
.enterprise_management_console_client ⇒ Octokit::EnterpriseManagementConsoleClient
EnterpriseManagementConsoleClient
client based on configured optionsConfigurable
-
.manage_ghes_client ⇒ Octokit::ManageGHESClient
ManageGHESClient
client based on configured optionsConfigurable
- .method_missing(method_name, *args, &block) private
- .respond_to_missing?(method_name, include_private = false) ⇒ Boolean private
Configurable
- Extended
configure | Set configuration options using a block. |
reset! | Reset configuration options to default values. |
same_options? | Compares client options to a Hash of requested options. |
setup | Alias for Configurable#reset!. |
fetch_client_id_and_secret, options |
Class Method Details
.client ⇒ Octokit::Client
API client based on configured options ::Octokit::Configurable
.enterprise_admin_client ⇒ Octokit::EnterpriseAdminClient
::Octokit::EnterpriseAdminClient
client based on configured options ::Octokit::Configurable
# File 'lib/octokit.rb', line 26
def enterprise_admin_client if defined?(@enterprise_admin_client) && @enterprise_admin_client. ( ) return @enterprise_admin_client end @enterprise_admin_client = Octokit::EnterpriseAdminClient.new( ) end
.enterprise_management_console_client ⇒ Octokit::EnterpriseManagementConsoleClient
::Octokit::EnterpriseManagementConsoleClient
client based on configured options ::Octokit::Configurable
# File 'lib/octokit.rb', line 37
def enterprise_management_console_client if defined?(@enterprise_management_console_client) && @enterprise_management_console_client. ( ) return @enterprise_management_console_client end @enterprise_management_console_client = Octokit::EnterpriseManagementConsoleClient.new( ) end
.manage_ghes_client ⇒ Octokit::ManageGHESClient
::Octokit::ManageGHESClient
client based on configured options ::Octokit::Configurable
# File 'lib/octokit.rb', line 48
def manage_ghes_client if defined?(@manage_ghes_client) && @manage_ghes_client. ( ) return @manage_ghes_client end @manage_ghes_client = Octokit::ManageGHESClient.new( ) end
.method_missing(method_name, *args, &block) (private)
[ GitHub ]# File 'lib/octokit.rb', line 65
def method_missing(method_name, *args, &block) if client.respond_to?(method_name) return client.send(method_name, *args, &block) elsif enterprise_admin_client.respond_to?(method_name) return enterprise_admin_client.send(method_name, *args, &block) elsif enterprise_management_console_client.respond_to?(method_name) return enterprise_management_console_client.send(method_name, *args, &block) elsif manage_ghes_client.respond_to?(method_name) return manage_ghes_client.send(method_name, *args, &block) end super end
.respond_to_missing?(method_name, include_private = false) ⇒ Boolean
(private)
# File 'lib/octokit.rb', line 58
def respond_to_missing?(method_name, include_private = false) client.respond_to?(method_name, include_private) || enterprise_admin_client.respond_to?(method_name, include_private) || enterprise_management_console_client.respond_to?(method_name, include_private) || manage_ghes_client.respond_to?(method_name, include_private) end