Class: Conjure::DigitalOcean::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/conjure/digital_ocean/account.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Account

Returns a new instance of Account.



7
8
9
# File 'lib/conjure/digital_ocean/account.rb', line 7

def initialize(options)
  @token = options[:token]
end

Instance Method Details

#get(path) ⇒ Object



11
12
13
# File 'lib/conjure/digital_ocean/account.rb', line 11

def get(path)
  request path, :method => :get
end

#post(path, data = {}) ⇒ Object



15
16
17
# File 'lib/conjure/digital_ocean/account.rb', line 15

def post(path, data = {})
  request path, :method => :post, :data => JSON.unparse(data)
end