Class: Quandora::Users
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
- #create(args) ⇒ Object
-
#me ⇒ Object
API LIST: Me, Index, Show.
Methods inherited from Request
Constructor Details
This class inherits a constructor from Quandora::Request
Instance Method Details
#create(args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/quandora/users.rb', line 7 def create(args) args = args.stringify_keys body = { "type": "post-user", "data": { "email": args["email"], "password": args["password"], "firstName": args["first_name"], "lastName": args["last_name"], "title": args["title"], "isManager": args["is_manager"], "aliases": args["aliases"], "groups": args["groups"] } } resp = @conn.post(@api) do |req| req.body = body.to_s req.headers['Content-Type'] = 'application/json' end end |
#me ⇒ Object
API LIST: Me, Index, Show
3 4 5 |
# File 'lib/quandora/users.rb', line 3 def me resp = @conn.get("#{@api}/me") end |