grabz_it 0.0.2 → 0.0.3
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.
- data/README.md +1 -1
- data/lib/grabz_it/client.rb +7 -7
- data/lib/grabz_it/image.rb +1 -1
- data/lib/grabz_it/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
data/lib/grabz_it/client.rb
CHANGED
@@ -114,8 +114,8 @@ module GrabzIt
|
|
114
114
|
def take_picture(options = {})
|
115
115
|
parse_options(options)
|
116
116
|
action = "takepicture.ashx"
|
117
|
-
|
118
|
-
response = Response.new(
|
117
|
+
res = query_api(action, generate_params)
|
118
|
+
response = Response.new(res.body)
|
119
119
|
raise response.message if response.message
|
120
120
|
response
|
121
121
|
end
|
@@ -158,8 +158,8 @@ module GrabzIt
|
|
158
158
|
:domain => URI.escape(domain),
|
159
159
|
:sig => sig
|
160
160
|
}
|
161
|
-
|
162
|
-
cookie_jar = CookieJar.new(
|
161
|
+
res = query_api(action, params)
|
162
|
+
cookie_jar = CookieJar.new(res.body)
|
163
163
|
raise cookie_jar.message if cookie_jar.message
|
164
164
|
cookie_jar
|
165
165
|
end
|
@@ -196,8 +196,8 @@ module GrabzIt
|
|
196
196
|
#
|
197
197
|
def get_picture(screenshot_id)
|
198
198
|
action = "getpicture.ashx"
|
199
|
-
|
200
|
-
image = Image.new(
|
199
|
+
res = query_api(action, { :id => screenshot_id })
|
200
|
+
image = Image.new(res)
|
201
201
|
image
|
202
202
|
end
|
203
203
|
|
@@ -209,7 +209,7 @@ module GrabzIt
|
|
209
209
|
uri = URI("#{API_BASE_URL}#{action}")
|
210
210
|
uri.query = URI.encode_www_form(params)
|
211
211
|
res = Net::HTTP.get_response(uri)
|
212
|
-
res
|
212
|
+
res
|
213
213
|
end
|
214
214
|
|
215
215
|
# Convert the options into the instance variable values
|
data/lib/grabz_it/image.rb
CHANGED
data/lib/grabz_it/version.rb
CHANGED