giocopro 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/giocopro/gioco_resource.rb +2 -2
- data/lib/giocopro.rb +5 -4
- metadata +3 -3
data/lib/giocopro.rb
CHANGED
@@ -22,8 +22,9 @@ module Giocopro
|
|
22
22
|
post_data('track_event.json', aid, data)
|
23
23
|
end
|
24
24
|
|
25
|
-
def ranking
|
26
|
-
|
25
|
+
def ranking(size, batch)
|
26
|
+
data = {'size' => size, 'batch' => batch}
|
27
|
+
get_data('ranking/retrieve.json', nil, data)
|
27
28
|
end
|
28
29
|
|
29
30
|
private
|
@@ -34,9 +35,9 @@ module Giocopro
|
|
34
35
|
data
|
35
36
|
end
|
36
37
|
|
37
|
-
def get_data(url, aid=nil)
|
38
|
+
def get_data(url, aid=nil, data=nil)
|
38
39
|
req = Net::HTTP::Get.new(('/api/' + url), @headers)
|
39
|
-
request!(
|
40
|
+
request!(data, aid, req)
|
40
41
|
end
|
41
42
|
|
42
43
|
def post_data(url, aid, data)
|
metadata
CHANGED