fiftyfifty 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/fiftyfifty.gemspec +1 -1
- data/lib/fiftyfifty.rb +3 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.2
|
data/fiftyfifty.gemspec
CHANGED
data/lib/fiftyfifty.rb
CHANGED
@@ -54,9 +54,11 @@ class FiftyFifty
|
|
54
54
|
def campaigner_details(campaigner_id)
|
55
55
|
return get("/campaigners/#{campaigner_id}")
|
56
56
|
end
|
57
|
+
|
58
|
+
# Get's response for a URL request. If the status is 400, raise a BadRequest
|
59
|
+
# exception, otherwise, return the associated data
|
57
60
|
def get(url)
|
58
61
|
response = Hashie::Mash.new(self.class.get(url))
|
59
|
-
|
60
62
|
if response.status == 400
|
61
63
|
raise BadRequest
|
62
64
|
else
|