Class: Organizai::User
- Inherits:
-
Object
- Object
- Organizai::User
- Defined in:
- lib/organizai/user.rb
Class Method Summary collapse
Class Method Details
.create(user_data) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/organizai/user.rb', line 4 def self.create(user_data) response = Organizai::Provider.request(:post,:user,'/users',user_data) # hack to hasheize the tokens until the api gets fixed if response.success? object = response.object tokens = object.delete(:token).split('&') object[:access_token] = tokens[0].split('=').last object[:token_secret] = tokens[1].split('=').last response.instance_exec do @object = object end end response end |