footy 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf582dedd0e62a8d95112f26cdba29ea66c56d0b
4
- data.tar.gz: 4cef928f2751dae1e4411de61997b15b4bb4d195
3
+ metadata.gz: 5818fd495f9831b3ac8ad2ff9fbb9629feb51e24
4
+ data.tar.gz: 317736f9c94a5abf0d23a0146d7ceb5a100b7969
5
5
  SHA512:
6
- metadata.gz: 4736bae5c900f8ffe21d4ddd96de3cd7d113458f36402c51e2afbe86259868b78f4dcd134f558a6eb4d3f84200ca3b2531b0f193ea96102909bbce5999488fb9
7
- data.tar.gz: 3bca618ac215c8949d4a232578d452e6315b1448fe4a19de6b3ad240e5de086d5ec66332ec01d00609f42273dfcc3bd91428e69183d9082332cee6fc3bb519c9
6
+ metadata.gz: 71d901c8ab9a702daa375dfe3e9e3f99968a2332b77658d41d9cda2a216ae3a7ab07ceca60abd0641a63ffd3bc71a6fc4799038dfb9fdb199fd11b30e8f77f7c
7
+ data.tar.gz: 2b0fd20ff9332ce434b7d28bce46a7c17ec4265ef6a8af77494adf3d9cc717e0b19d47c17c2877ca7eaa112cc35cc47dad844f02b80099396d83e511508e427d
@@ -19,4 +19,7 @@ module Footy
19
19
  config = configuration
20
20
  yield(config)
21
21
  end
22
+
23
+ class FootyError < StandardError
24
+ end
22
25
  end
@@ -4,7 +4,9 @@ module Footy
4
4
  class Api
5
5
  class << self
6
6
  def call options={}
7
- JSON.parse(Net::HTTP.get_response(URI.parse(url(options))).body)
7
+ response = JSON.parse(Net::HTTP.get_response(URI.parse(url(options))).body)
8
+ raise Footy::FootyError, response["ERROR"] unless response["ERROR"] == "OK"
9
+ response
8
10
  end
9
11
 
10
12
  private
@@ -1,3 +1,3 @@
1
1
  module Footy
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: footy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laiq Jafri