class Playfair::Client

Attributes

api[R]
email[RW]
endpoint[RW]
password[RW]

Public Class Methods

new() click to toggle source
# File lib/playfair/client.rb, line 8
def initialize
  @endpoint = "https://playfairapp.com"
end

Public Instance Methods

configure() { |self| ... } click to toggle source
# File lib/playfair/client.rb, line 12
def configure
  yield self

  @api = Her::API.new
  @api.setup url: @endpoint do |c|
    c.basic_auth @email, @password
    c.use Faraday::Request::UrlEncoded
    c.use Her::Middleware::DefaultParseJSON
    c.use Faraday::Adapter::NetHttp
  end
end