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(key:) ⇒ WiwoEntries

Returns a new instance of WiwoEntries.



8
9
10
# File 'lib/proz/wiwo_entries.rb', line 8

def initialize(key:)
  @key = key
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



7
8
9
# File 'lib/proz/wiwo_entries.rb', line 7

def key
  @key
end

Instance Method Details

#entriesObject



12
13
14
# File 'lib/proz/wiwo_entries.rb', line 12

def entries
  all_wiwos
end

#user_entries(user_uuid) ⇒ Object



24
25
26
# File 'lib/proz/wiwo_entries.rb', line 24

def user_entries(user_uuid)
  self.class.get("/wiwo?user_uuid=" + user_uuid, headers: { 'X-Proz-API-Key' => key })
end

#usersObject



20
21
22
# File 'lib/proz/wiwo_entries.rb', line 20

def users
  all_wiwos["users"]
end

#wiwosObject



16
17
18
# File 'lib/proz/wiwo_entries.rb', line 16

def wiwos
  all_wiwos["wiwos"]
end