Class: Octokit::EnterpriseManagementConsoleClient

Inherits:
Object
  • Object
show all
Includes:
Configurable, Connection, ManagementConsole, Warnable
Defined in:
lib/octokit/enterprise_management_console_client.rb,
lib/octokit/enterprise_management_console_client/management_console.rb

Overview

EnterpriseManagementConsoleClient is only meant to be used by GitHub Enterprise Admins and provides access to the management console API endpoints.

Defined Under Namespace

Modules: ManagementConsole

Constant Summary

Constants included from Connection

Connection::CONVENIENCE_HEADERS

Constants included from Authentication

Authentication::FARADAY_BASIC_AUTH_KEYS

Instance Attribute Summary

Attributes included from Configurable

#access_token, #api_endpoint, #auto_paginate, #bearer_token, #client_id, #client_secret, #connection_options, #default_media_type, #login, #manage_ghes_endpoint, #manage_ghes_password, #manage_ghes_username, #management_console_endpoint, #management_console_password, #middleware, #netrc, #netrc_file, #password, #per_page, #proxy, #ssl_verify_mode, #user_agent, #web_endpoint

Instance Method Summary collapse

Methods included from ManagementConsole

#add_authorized_key, #authorized_keys, #config_status, #edit_settings, #maintenance_status, #remove_authorized_key, #set_maintenance_status, #settings, #start_configuration, #upgrade, #upload_license

Methods included from Warnable

octokit_warn

Methods included from Connection

#agent, #delete, #get, #head, #last_response, #paginate, #patch, #post, #put, #root

Methods included from Authentication

#application_authenticated?, #basic_authenticated?, #bearer_authenticated?, #token_authenticated?, #user_authenticated?

Methods included from Configurable

#configure, keys, #netrc?, #reset!, #same_options?

Constructor Details

#initialize(options = {}) ⇒ EnterpriseManagementConsoleClient

Returns a new instance of EnterpriseManagementConsoleClient.



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/octokit/enterprise_management_console_client.rb', line 21

def initialize(options = {})
  # Use options passed in, but fall back to module defaults
  # rubocop:disable Style/HashEachMethods
  #
  # This may look like a `.keys.each` which should be replaced with `#each_key`, but
  # this doesn't actually work, since `#keys` is just a method we've defined ourselves.
  # The class doesn't fulfill the whole `Enumerable` contract.
  Octokit::Configurable.keys.each do |key|
    # rubocop:enable Style/HashEachMethods
    instance_variable_set(:"@#{key}", options[key] || Octokit.instance_variable_get(:"@#{key}"))
  end
end