Module: Untappd

Extended by:
Configuration
Defined in:
lib/untappd-api.rb,
lib/untappd-api/api.rb,
lib/untappd-api/error.rb,
lib/untappd-api/client.rb,
lib/untappd-api/version.rb,
lib/untappd-api/client/beer.rb,
lib/untappd-api/client/user.rb,
lib/untappd-api/client/venue.rb,
lib/untappd-api/configuration.rb,
lib/untappd-api/client/brewery.rb,
lib/untappd-api/client/checkin.rb

Overview

Adapted from Ruby Twitter gem by John Nunemaker

@see https://github.com/jnunemaker/twitter

Defined Under Namespace

Modules: Configuration Classes: API, BadGateway, BadRequest, Client, Error, GatewayTimeout, General, InternalError, NotFound, Unauthorized, Unavailable

Constant Summary collapse

VERSION =
"0.1.3"

Constants included from Configuration

Configuration::DEFAULT_APPLICATION_KEY, Configuration::DEFAULT_ENDPOINT, Configuration::DEFAULT_PASSWORD, Configuration::DEFAULT_USERNAME, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.client(options = {}) ⇒ Untappd::Client

Alias for Untappd::Client.new

Returns:



15
16
17
# File 'lib/untappd-api.rb', line 15

def self.client(options={})
  Untappd::Client.new(options)
end

.method_missing(method, *args, &block) ⇒ Object

Delegate to Untappd::Client



20
21
22
23
# File 'lib/untappd-api.rb', line 20

def self.method_missing(method, *args, &block)
  return super unless client.respond_to?(method)
  client.send(method, *args, &block)
end

.respond_to?(method) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/untappd-api.rb', line 25

def self.respond_to?(method)
  client.respond_to?(method) || super
end