Module: WrAPI

Extended by:
Configuration, RespondTo
Defined in:
lib/wrapi/configuration.rb,
lib/wrapi.rb,
lib/wrapi/api.rb,
lib/wrapi/entity.rb,
lib/wrapi/request.rb,
lib/wrapi/version.rb,
lib/wrapi/connection.rb,
lib/wrapi/pagination.rb,
lib/wrapi/respond_to.rb,
lib/wrapi/authentication.rb

Overview

require_relative ‘./pagination’ require_relative ‘./version’

Defined Under Namespace

Modules: Authentication, Configuration, Connection, Request, RequestPagination, RespondTo Classes: API

Constant Summary collapse

VERSION =
'0.4.6'

Constants included from Configuration

Configuration::DEFAULT_CONNECTION_OPTIONS, Configuration::DEFAULT_FORMAT, Configuration::DEFAULT_PAGE_SIZE, Configuration::DEFAULT_PAGINATION, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from RespondTo

method_missing, respond_to?

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.client(options = {}) ⇒ Object

Abstract method should be overridden

Returns:

  • client

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/wrapi.rb', line 18

def self.client(options = {})
  raise NotImplementedError, 'Abstract method self.client must implemented when including ResponTo'
end

.resetObject

set/override defaults



23
24
25
26
# File 'lib/wrapi.rb', line 23

def self.reset
  super
  self.user_agent = "Ruby API wrapper #{WrAPI::VERSION}".freeze
end