Module: Lapse

Defined in:
lib/lapse.rb,
lib/lapse/cli.rb,
lib/lapse/error.rb,
lib/lapse/client.rb,
lib/lapse/version.rb,
lib/lapse/response.rb,
lib/lapse/transport.rb,
lib/lapse/client/clips.rb,
lib/lapse/client/likes.rb,
lib/lapse/client/users.rb,
lib/lapse/client/frames.rb,
lib/lapse/transport/http.rb,
lib/lapse/client/configuration.rb,
lib/lapse/client/user_timelines.rb,
lib/lapse/client/global_timelines.rb

Overview

Lapse, as in teeter-Lapse, let’s you work with the Seesaw API in Ruby.

Defined Under Namespace

Modules: Transport Classes: BadGateway, BadRequest, Cli, Client, Error, Forbidden, InternalServerError, NotAcceptable, NotFound, NotImplemented, ServiceUnavailable, Unauthorized, UniqueIDRequired, UnprocessableEntity

Constant Summary collapse

ERROR_MAP =

Status code to exception map

{
  400 => Lapse::BadRequest,
  401 => Lapse::Unauthorized,
  403 => Lapse::Forbidden,
  404 => Lapse::NotFound,
  406 => Lapse::NotAcceptable,
  422 => Lapse::UnprocessableEntity,
  500 => Lapse::InternalServerError,
  501 => Lapse::NotImplemented,
  502 => Lapse::BadGateway,
  503 => Lapse::ServiceUnavailable
}
VERSION =

Verion of the Lapse gem

'0.1.0'

Class Method Summary collapse

Class Method Details

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

Delegate to Lapse::Client.new



16
17
18
19
# File 'lib/lapse.rb', line 16

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

.new(options = {}) ⇒ Lapse::Client

Alias for Lapse::Client.new

Returns:



11
12
13
# File 'lib/lapse.rb', line 11

def new(options = {})
  Client.new(options)
end

.respond_to?(method, include_private = false) ⇒ Boolean

Forward respond_to? to Lapse::Client.new

Returns:

  • (Boolean)


22
23
24
# File 'lib/lapse.rb', line 22

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