Method: Appfront::API#initialize
- Defined in:
- lib/appfront/api.rb
#initialize(opts = {}) ⇒ API
Returns a new instance of API.
7 8 9 10 11 12 13 14 15 |
# File 'lib/appfront/api.rb', line 7 def initialize(opts = {}) @host = opts[:host] || 'https://api.appfront.io/v1' if opts[:email] and opts[:password] @email, @pass = opts[:email], opts[:password] else @email, @pass = Appfront::Command::Auth.credentials end end |