planvine 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/planvine/builders/categories_builder.rb +2 -7
- data/lib/planvine/planvine_api.rb +4 -2
- data/lib/planvine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6547d51f290be1c452bc78f4467fd924a950cdf5
|
4
|
+
data.tar.gz: c8996cdc7663759b04e4a19a7fb0e3a867e1e9e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36b82188885489677c799e7a2626ab537f2235267319cd90af6572ac9787194eb56c98756277e8041a7876c5ae606c90c13dace4385cc72ff0bae2f2a0ca67d0
|
7
|
+
data.tar.gz: c7dc49b648fa4308acc5252ffb861ee1c506109d8c3d89814f01b1218ff823aad05107fb050c644223ba2aaa1dd42392ef84eadc4a90a339bb225fc702cb12b8
|
@@ -18,15 +18,10 @@ module Planvine
|
|
18
18
|
|
19
19
|
def events
|
20
20
|
return [] if api.category_events(id).nil?
|
21
|
-
api.category_events(id).map do |
|
22
|
-
|
21
|
+
api.category_events(id).map do |events|
|
22
|
+
events.map do |event|
|
23
23
|
full_event = api.event(event["id"])
|
24
24
|
EventsBuilder.build(full_event)
|
25
|
-
rescue
|
26
|
-
event.map do |event|
|
27
|
-
full_event = api.event(event["id"])
|
28
|
-
EventsBuilder.build(full_event)
|
29
|
-
end
|
30
25
|
end
|
31
26
|
end.flatten
|
32
27
|
end
|
@@ -32,9 +32,11 @@ module Planvine
|
|
32
32
|
|
33
33
|
self.class.get("/category/#{id}/events?api_key=#{@api_key}")["_metadata"]["total_pages"].times do |i|
|
34
34
|
next if (i+1) == 1
|
35
|
-
|
35
|
+
page = self.class.get("/category/#{id}/events?api_key=#{@api_key}&page=#{i + 1}")["data"]
|
36
|
+
|
37
|
+
events << page
|
36
38
|
end
|
37
|
-
events
|
39
|
+
events
|
38
40
|
end
|
39
41
|
|
40
42
|
def event(id)
|
data/lib/planvine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: planvine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Patching
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|