class UwsgiItClient

Constants

API
VERSION

Attributes

password[R]
url[R]
username[R]

Public Class Methods

new(opts) click to toggle source
# File lib/uwsgi_it_client.rb, line 17
def initialize(opts)
  @url      = opts.fetch :url
  @username = opts.fetch :username
  @password = opts.fetch :password
end

Public Instance Methods

delete(api_name, payload, opts={}) click to toggle source
# File lib/uwsgi_it_client.rb, line 42
def delete(api_name, payload, opts={})
  Deleter.new send("#{api_name}_url", opts[:id]), payload, auth_data
end
post(api_name, payload, opts={}) click to toggle source
# File lib/uwsgi_it_client.rb, line 38
def post(api_name, payload, opts={})
  Poster.new send("#{api_name}_url", opts[:id]), payload, auth_data
end

Private Instance Methods

auth_data() click to toggle source
# File lib/uwsgi_it_client.rb, line 48
def auth_data
  {username: username, password: password}
end