Module: FantasticstayApi

Defined in:
lib/fantasticstay_api.rb,
lib/fantasticstay_api/api.rb,
lib/fantasticstay_api/client.rb,
lib/fantasticstay_api/version.rb,
lib/fantasticstay_api/constants.rb,
lib/fantasticstay_api/api_exceptions.rb,
lib/fantasticstay_api/http_status_codes.rb

Overview

Base module for Fantasticstay API

Defined Under Namespace

Modules: ApiExceptions, Constants, HttpStatusCodes Classes: API, Client, Error

Constant Summary collapse

LIBNAME =
'fantasticstay_api'
LIBDIR =
File.expand_path(LIBNAME.to_s, __dir__)
VERSION =
'0.1.8'

Class Method Summary collapse

Class Method Details

.default_middleware(options = {}) ⇒ Proc

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Default middleware stack that uses default adapter as specified by configuration setup

Returns:

  • (Proc)


34
35
36
# File 'lib/fantasticstay_api.rb', line 34

def default_middleware(options = {})
  Middleware.default(options)
end

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Delegate to FantasticstayApi::Client



41
42
43
44
45
46
47
# File 'lib/fantasticstay_api.rb', line 41

def method_missing(method_name, *args, &block)
  if new.respond_to?(method_name)
    new.send(method_name, *args, &block)
  else
    super.respond_to_missing?
  end
end

.new(options = {}, &block) ⇒ FantasticstayApi::Client

Alias for FantasticstayApi::Client.new

Parameters:

  • options (Hash) (defaults to: {})

    the configuration options

Returns:



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

def new(options = {}, &block)
  Client.new(options, &block)
end

.respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/fantasticstay_api.rb', line 49

def respond_to_missing?(method_name, include_private = false)
  new.respond_to?(method_name, include_private) || super(method_name, include_private)
end