Class: Proz::WiwoEntries
- Inherits:
-
Object
- Object
- Proz::WiwoEntries
- Includes:
- HTTParty
- Defined in:
- lib/proz/wiwo_entries.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #entries ⇒ Object
-
#initialize(token:) ⇒ WiwoEntries
constructor
A new instance of WiwoEntries.
- #user_entries(user_uuid) ⇒ Object
Constructor Details
#initialize(token:) ⇒ WiwoEntries
Returns a new instance of WiwoEntries.
8 9 10 |
# File 'lib/proz/wiwo_entries.rb', line 8 def initialize(token:) @token = token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
7 8 9 |
# File 'lib/proz/wiwo_entries.rb', line 7 def token @token end |
Instance Method Details
#entries ⇒ Object
12 13 14 |
# File 'lib/proz/wiwo_entries.rb', line 12 def entries self.class.get("/wiwo", headers: { 'Authorization' => "Bearer #{token}" }) end |
#user_entries(user_uuid) ⇒ Object
16 17 18 |
# File 'lib/proz/wiwo_entries.rb', line 16 def user_entries(user_uuid) self.class.get("/wiwo?user_uuid=" + user_uuid, headers: { 'Authorization' => "Bearer #{token}" }) end |