Class: Proz::WiwoEntries

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/proz/wiwo_entries.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#tokenObject (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

#entriesObject



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