Class: Velix::Modules::Me
- Inherits:
-
Object
- Object
- Velix::Modules::Me
- Defined in:
- lib/velix/modules/me.rb
Overview
GET /v1/api/me/personId — scope me:read
Defined Under Namespace
Classes: Result
Instance Method Summary collapse
- #find(person_id) ⇒ Object
-
#initialize(client) ⇒ Me
constructor
A new instance of Me.
Constructor Details
#initialize(client) ⇒ Me
Returns a new instance of Me.
9 10 11 |
# File 'lib/velix/modules/me.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#find(person_id) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/velix/modules/me.rb', line 13 def find(person_id) resp = @client.get("/v1/api/me/#{person_id}") Result.new( id: resp["id"], name: resp["name"], email: resp["email"], phone: resp["phone"], photo_url: resp["photo_url"], created_at: resp["created_at"] ) end |