Method: Cloudkey::API#initialize
- Defined in:
- lib/cloudkey/api.rb
#initialize(user_id, key, options = {}) ⇒ API
Returns a new instance of API.
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cloudkey/api.rb', line 16 def initialize user_id, key, ={} raise "Can't connect without an user_id" unless user_id raise "Can't connect without an key" unless key @user_id, @key = user_id, key @base_url = [:base_url] || 'http://api.dmcloud.net' @proxy = [:proxy] @act_as_user = [:act_as_user] @target = @base_url + END_POINT end |