planvine 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05ccc8202243a3cfb0eac6d2a12eac0d0faf9431
4
- data.tar.gz: 64fa9de473cb05f2ae7b7f669c6e304a07d7a1b6
3
+ metadata.gz: c5569005852f8eec172c1b2b4a6121079ea29220
4
+ data.tar.gz: 9be44488c53e8dad1d08395b9fa0a8ebc623c0da
5
5
  SHA512:
6
- metadata.gz: 9c31db93c0380a8fd946bfe2d2bd9b70f9f67d3a0a9602d0129ee6fecb7008d2f34bf332e613464dc89d87b9e260adecfd57af2a0064e63b8049e68408364692
7
- data.tar.gz: fb94b7c7048f934906329963473dd02c34f82ef5e77afb579e4a73095366574b7b188c677325aa936d2470b039b3353e2bf5d11982a01b9625622debb94c2151
6
+ metadata.gz: f93e50b8da278ee7fd08d929fd2567261a974dcb420ab9a299ee0e8f8b70c49f1ae29be4b7aa52fb1e59e85e7c38de5ca1741811d0a116a77c59bfeb4edb8225
7
+ data.tar.gz: f36754ab99c9f6fc279c25f8ea03fd2cc87445880ea010ceb228c0abebebe820babba7e26465f867c443f4c67ca7f091b04d371042dd03f163ff94ac5aa7c246
@@ -22,7 +22,11 @@ module Planvine
22
22
  end
23
23
 
24
24
  def category_events(id)
25
- number_of_pages = self.class.get("/category/#{id}/events?api_key=#{@api_key}")["_metadata"]["total_pages"]
25
+ begin
26
+ number_of_pages = self.class.get("/category/#{id}/events?api_key=#{@api_key}")["_metadata"]["total_pages"]
27
+ rescue
28
+ number_of_pages = 1
29
+ end
26
30
  events = [self.class.get("/category/#{id}/events?api_key=#{@api_key}")["data"]]
27
31
  return events if number_of_pages == 1
28
32
 
@@ -1,3 +1,3 @@
1
1
  module Planvine
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: planvine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Patching