class Manabu::Client
General client interface which bundles together most client functionality
Attributes
auth[RW]
status[RW]
transactor[RW]
Public Class Methods
new(username, password, host, port = 80, **options)
click to toggle source
Initializes with login details and passes options to all linked instances.
Parameters:¶ ↑
- username
-
The User Name or e-mail address
- password
-
The password for the given user
- host
-
The host URL
- port
-
The host port (default 80)
- options
-
A hash of options, such as:
-
force_secure_connection - (default true), set to false to disable HTTPS/SSL
-
transport_type - (default :msgpack), sets transport data type [:msgpack, :json]
-
# File lib/manabu/client.rb, line 24 def initialize(username, password, host, port = 80, **options) @status = :initializing @auth = Manabu::Connection::Auth.new(username, password, host, port, options) if @auth.success? @transactor = @auth.transactor @status = :connected else @status = :failed raise Error::Connection::Unauthorized end end
Public Instance Methods
delete(path, **args)
click to toggle source
get(path, **args)
click to toggle source
patch(path, **args)
click to toggle source
post(path, **args)
click to toggle source
simple_get(endpoint)
click to toggle source
# File lib/manabu/client.rb, line 36 def simple_get(endpoint) @transactor.simple_get(endpoint) end