### Home Classes Methods

### In Files

- lib/github_api/configuration.rb

### Methods

- ::extended
- ::keys
- #configure
- #options
- #reset!

### Class/Module Index

Quicksearch

- Github
- Github::API
- Github::Activity
- Github::Activity::Events
- Github::Activity::Notifications
- Github::Activity::Starring
- Github::Activity::Watching
- Github::ApiFactory
- Github::Arguments
- Github::Authorization
- Github::Authorizations
- Github::AutoloadHelper
- Github::Client
- Github::Configuration
- Github::Connection
- Github::Constants
- Github::CoreExt
- Github::CoreExt::OrderedHash
- Github::Descendants
- Github::Emojis
- Github::Error
- Github::Error::BadRequest
- Github::Error::ClientError
- Github::Error::Forbidden
- Github::Error::GithubError
- Github::Error::InternalServerError
- Github::Error::InvalidOptions
- Github::Error::NotAcceptable
- Github::Error::NotFound
- Github::Error::RequiredParams
- Github::Error::ServiceError
- Github::Error::ServiceUnavailable
- Github::Error::Unauthorized
- Github::Error::UnknownValue
- Github::Error::UnprocessableEntity
- Github::Error::Validations
- Github::Gists
- Github::Gists::Comments
- Github::GitData
- Github::GitData::Blobs
- Github::GitData::Commits
- Github::GitData::References
- Github::GitData::Tags
- Github::GitData::Trees
- Github::Gitignore
- Github::Issues
- Github::Issues::Assignees
- Github::Issues::Comments
- Github::Issues::Events
- Github::Issues::Labels
- Github::Issues::Milestones
- Github::Jsonable
- Github::Markdown
- Github::Meta
- Github::MimeType
- Github::Normalizer
- Github::Orgs
- Github::Orgs::Members
- Github::Orgs::Teams
- Github::PageIterator
- Github::PageLinks
- Github::PagedRequest
- Github::Pagination
- Github::ParameterFilter
- Github::ParamsHash
- Github::PullRequests
- Github::PullRequests::Comments
- Github::RateLimit
- Github::Repos
- Github::Repos::Collaborators
- Github::Repos::Comments
- Github::Repos::Commits
- Github::Repos::Contents
- Github::Repos::Downloads
- Github::Repos::Forks
- Github::Repos::Hooks
- Github::Repos::Keys
- Github::Repos::Merging
- Github::Repos::PubSubHubbub
- Github::Repos::Statistics
- Github::Repos::Statuses
- Github::Request
- Github::Request::BasicAuth
- Github::Request::Jsonize
- Github::Request::OAuth2
- Github::Resource
- Github::Response
- Github::Response::Header
- Github::Response::Jsonize
- Github::Response::Mashify
- Github::Response::RaiseError
- Github::Response::Xmlize
- Github::ResponseWrapper
- Github::S3Uploader
- Github::Say
- Github::Scopes
- Github::Search
- Github::Users
- Github::Users::Emails
- Github::Users::Followers
- Github::Users::Keys
- Github::Utils
- Github::Utils::Url
- Github::VERSION
- Github::Validations
- Github::Validations::Format
- Github::Validations::Presence
- Github::Validations::Required
- Github::Validations::Token
- Hash

No matching classes.

# Github::Configuration

### Constants

DEFAULT_ADAPTER

  Other adapters are :typhoeus, :patron, :em_synchrony, :excon, :test

DEFAULT_AUTO_PAGINATION

  By default, don't traverse the page links

DEFAULT_BASIC_AUTH

  By default, don't set a user basic authentication

DEFAULT_CLIENT_ID

  By default, don't set an application key

DEFAULT_CLIENT_SECRET

  By default, don't set an application secret

DEFAULT_CONNECTION_OPTIONS

  By default uses the Faraday connection options if none is set

DEFAULT_ENDPOINT

  The api endpoint used to connect to GitHub if none is set

DEFAULT_LOGIN

  By default, don't set a user login name

DEFAULT_MIME_TYPE

  By default the `Accept` header will make a request for `JSON`

DEFAULT_OAUTH_TOKEN

  By default, don't set a user oauth access token

DEFAULT_ORG

  By default, don't set organization name

DEFAULT_PASSWORD

  By default, don't set a user password

DEFAULT_REPO

  By default, don't set repository name

DEFAULT_SITE

  The web endpoint used to connect to GitHub if none is set

DEFAULT_SSL

  The default SSL configuration

DEFAULT_USER

  By default, don't set user name

DEFAULT_USER_AGENT

  The value sent in the http header for 'User-Agent' if none is set

VALID_OPTIONS_KEYS

### Public Class Methods

extended(base) click to toggle source

    # File lib/github_api/configuration.rb, line 83
    def self.extended(base)
      base.reset!
    end

keys() click to toggle source

    # File lib/github_api/configuration.rb, line 88
    def keys
      VALID_OPTIONS_KEYS
    end

### Public Instance Methods

configure() click to toggle source

Convenience method to allow for global setting of configuration options

    # File lib/github_api/configuration.rb, line 79
    def configure
      yield self
    end

options() click to toggle source

    # File lib/github_api/configuration.rb, line 93
    def options
      options = {}
      VALID_OPTIONS_KEYS.each { |k| options[k] = send(k) }
      options
    end

reset!() click to toggle source

Reset configuration options to their defaults

    # File lib/github_api/configuration.rb, line 101
    def reset!
      self.adapter            = DEFAULT_ADAPTER
      self.client_id          = DEFAULT_CLIENT_ID
      self.client_secret      = DEFAULT_CLIENT_SECRET
      self.oauth_token        = DEFAULT_OAUTH_TOKEN
      self.endpoint           = DEFAULT_ENDPOINT
      self.site               = DEFAULT_SITE
      self.ssl                = DEFAULT_SSL
      self.user_agent         = DEFAULT_USER_AGENT
      self.connection_options = DEFAULT_CONNECTION_OPTIONS
      self.mime_type          = DEFAULT_MIME_TYPE
      self.user               = DEFAULT_USER
      self.repo               = DEFAULT_REPO
      self.org                = DEFAULT_ORG
      self.login              = DEFAULT_LOGIN
      self.password           = DEFAULT_PASSWORD
      self.basic_auth         = DEFAULT_BASIC_AUTH
      self.auto_pagination    = DEFAULT_AUTO_PAGINATION
      self
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.