Class: BerlinBuehnen::ListResponse
Constant Summary
collapse
- META =
"meta"
- OBJECTS =
"objects"
- NEXT =
"next"
- PREVIOUS =
"previous"
- OFFSET =
"offset"
- LIMIT =
"limit"
- TOTAL_COUNT =
"total_count"
Instance Attribute Summary
Attributes inherited from Response
#json_response
Instance Method Summary
collapse
Methods inherited from Response
create, #initialize
Instance Method Details
#data ⇒ Object
13
14
15
|
# File 'lib/berlin_buehnen/list_response.rb', line 13
def data
@data ||= @json_response[OBJECTS]
end
|
#limit ⇒ Object
25
26
27
|
# File 'lib/berlin_buehnen/list_response.rb', line 25
def limit
meta[LIMIT]
end
|
#next? ⇒ Boolean
17
18
19
|
# File 'lib/berlin_buehnen/list_response.rb', line 17
def next?
!meta[NEXT].nil?
end
|
#offset ⇒ Object
29
30
31
|
# File 'lib/berlin_buehnen/list_response.rb', line 29
def offset
meta[OFFSET]
end
|
#previous? ⇒ Boolean
21
22
23
|
# File 'lib/berlin_buehnen/list_response.rb', line 21
def previous?
!meta[PREVIOUS].nil?
end
|
#total_count ⇒ Object
33
34
35
|
# File 'lib/berlin_buehnen/list_response.rb', line 33
def total_count
meta[TOTAL_COUNT]
end
|