footy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/footy.rb +3 -0
- data/lib/footy/api.rb +3 -1
- data/lib/footy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5818fd495f9831b3ac8ad2ff9fbb9629feb51e24
|
4
|
+
data.tar.gz: 317736f9c94a5abf0d23a0146d7ceb5a100b7969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71d901c8ab9a702daa375dfe3e9e3f99968a2332b77658d41d9cda2a216ae3a7ab07ceca60abd0641a63ffd3bc71a6fc4799038dfb9fdb199fd11b30e8f77f7c
|
7
|
+
data.tar.gz: 2b0fd20ff9332ce434b7d28bce46a7c17ec4265ef6a8af77494adf3d9cc717e0b19d47c17c2877ca7eaa112cc35cc47dad844f02b80099396d83e511508e427d
|
data/lib/footy.rb
CHANGED
data/lib/footy/api.rb
CHANGED
@@ -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
|
data/lib/footy/version.rb
CHANGED