fanforce 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/fanforce/api/response.rb +7 -6
- data/lib/fanforce/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NThhNzJhZDI1ZWMyYjllMWUzYTkwNmIwOWY5NzdmNzNhOWMyZWVhNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzM2YzU2Y2M3YWFiYmNhNDYxN2FkMTRiZWYwOTUxMjE5ZTlhZmFlZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2ZjOGEzZTg5ZjBiZjBlYTYxMGZjNzhkZDM1MmNjOTA0MTRkZmVhZThhZGM2
|
10
|
+
ZDUxZjhiMDZiY2MxNzA0N2E3OTBhMDI2MzFjNzFlZTA1NDIzMWJmN2MwMjdj
|
11
|
+
MDFhZmFlM2RjNDI1MWYwMWQ5MmUyZWI0MmI2OTZiZWI3YmMwNjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTJlN2Y0Y2FlNjllZjBlNTYxOTcwOGIyN2Q5NjUwYWI3NDMwNzBiZDZiZTIw
|
14
|
+
M2JlMWYxZTE5ODdjMDRlMjRhNjk1YTUyODdjMTQ2NjA3ZTZkYjVjODcyNmM1
|
15
|
+
NjlkYTEzNWJkMmM1M2EyZTlmZDg4Yjk2Yzc1ODVmYzdiZGVmZTA=
|
@@ -22,7 +22,8 @@ class Fanforce::Api::Result < Hash
|
|
22
22
|
@request = request
|
23
23
|
@requested_url = requested_url
|
24
24
|
@requested_params = requested_params
|
25
|
-
|
25
|
+
@data = response_hash
|
26
|
+
self.replace(response_hash)
|
26
27
|
end
|
27
28
|
|
28
29
|
def data
|
@@ -42,8 +43,8 @@ class Fanforce::Api::Result < Hash
|
|
42
43
|
def total_results; 1 end
|
43
44
|
def current_page; 1 end
|
44
45
|
def total_pages; 1 end
|
45
|
-
def
|
46
|
-
def
|
46
|
+
def prev_page_url; nil end
|
47
|
+
def next_page_url; nil end
|
47
48
|
def code; @response.code end
|
48
49
|
end
|
49
50
|
|
@@ -55,7 +56,7 @@ class Fanforce::Api::Results < Array
|
|
55
56
|
@request = request
|
56
57
|
@requested_url = requested_url
|
57
58
|
@requested_params = requested_params
|
58
|
-
|
59
|
+
self.replace(response_hash[:results])
|
59
60
|
end
|
60
61
|
|
61
62
|
def data
|
@@ -87,13 +88,13 @@ class Fanforce::Api::Results < Array
|
|
87
88
|
@total_pages ||= @response_hash[:total_pages]
|
88
89
|
end
|
89
90
|
|
90
|
-
def
|
91
|
+
def prev_page_url;
|
91
92
|
@prev_url ||= if request.method == :get and current_page > 1
|
92
93
|
"#{@requested_url}?#{Fanforce::Utils.to_query_string(@requested_params.merge(page: current_page-1))}"
|
93
94
|
end
|
94
95
|
end
|
95
96
|
|
96
|
-
def
|
97
|
+
def next_page_url;
|
97
98
|
@next_url ||= if @request.method == :get and total_pages > current_page
|
98
99
|
"#{@requested_url}?#{Fanforce::Utils.to_query_string(@requested_params.merge(page: current_page+1))}"
|
99
100
|
end
|
data/lib/fanforce/api/version.rb
CHANGED