class Gitter::API::Config

A singleton class for holding on to default values for the Gitter::API::Client for the given session.

When making changes here, it will affect every Gitter::API::Client that is configured going forward, unless the values are changed on client instanciation via the config hash.

Tunable attributes

Constants

DEFAULT_API_PREFIX

API prefix for production api.gitter.im (“/v1”)

DEFAULT_API_URL

Default API URL (“api.gitter.im”)

Attributes

api_prefix[RW]

Path prefix for API routes

Generally in development (localhost), “/api/v1” should be used instead of the default (“/v1”)

api_url[RW]

Endpoint URL for the Gitter API

ssl_verify[RW]

Whether or not to verify SSL certs (default is true)

Set to false when using localhost (development) since a local server most likely will not have valid https certs

Public Class Methods

api_uri() click to toggle source

URI object cache of the api_url

# File lib/gitter/api/config.rb, line 72
def api_uri
  @api_uri ||= URI(api_url)
end
api_url=(url) click to toggle source

Reset the reference for @api_url

Also clears the cache for +@api_uri+

# File lib/gitter/api/config.rb, line 64
def api_url= url
  @api_url = url
  @api_uri = nil # clear @api_uri cache when @api_url is set
end