Class: YouCanBookMe::Client
- Inherits:
-
Object
- Object
- YouCanBookMe::Client
- Defined in:
- lib/YouCanBookMe/client.rb,
lib/YouCanBookMe/client/account.rb,
lib/YouCanBookMe/client/bookings.rb,
lib/YouCanBookMe/client/profiles.rb,
lib/YouCanBookMe/client/caligraph.rb,
lib/YouCanBookMe/client/profiles/bookings.rb
Defined Under Namespace
Modules: Account, Bookings, Caligraph, Profiles
Constant Summary
Constants included from YouCanBookMe::Connection::API
YouCanBookMe::Connection::API::BASE_URL
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Bookings
Methods included from Profiles
#create, #destroy, #index, #show, #update
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 17 18 19 |
# File 'lib/YouCanBookMe/client.rb', line 11 def initialize( = {}) email = [:email] || ENV['YOUCANBOOKME_EMAIL'] password = [:password] || ENV['YOUCANBOOKME_PASSWORD'] raise YouCanBookMe::AuthorizationNotSpecified if email.empty? || password.empty? YouCanBookMe.instance_variable_set(:@email, email) YouCanBookMe.instance_variable_set(:@password, password) end |