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¶ ↑
-
api_prefix
-
api_url
-
ssl_verify
Constants
- DEFAULT_API_PREFIX
API
prefix for production api.gitter.im (“/v1”)- DEFAULT_API_URL
Default
API
URL (“api.gitter.im”)
Attributes
Path prefix for API
routes
Generally in development (localhost), “/api/v1” should be used instead of the default (“/v1”)
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
URI object cache of the api_url
# File lib/gitter/api/config.rb, line 72 def api_uri @api_uri ||= URI(api_url) end
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