eshq 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/eshq/client.rb +7 -0
- data/lib/eshq/version.rb +1 -1
- metadata +3 -3
data/lib/eshq/client.rb
CHANGED
@@ -13,6 +13,13 @@ module ESHQ
|
|
13
13
|
@secret = api_secret
|
14
14
|
end
|
15
15
|
|
16
|
+
def get(path, params = {})
|
17
|
+
uri = url_for(path)
|
18
|
+
uri.query = params.merge(credentials).map {|k,v| [k, "=", v].join }.join("&")
|
19
|
+
response = Net::HTTP.get_response(uri)
|
20
|
+
response.body
|
21
|
+
end
|
22
|
+
|
16
23
|
def post(path, params)
|
17
24
|
response = Net::HTTP.post_form(url_for(path), params.merge(credentials))
|
18
25
|
if response.code == "200"
|
data/lib/eshq/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mathias Biilmann Christensen
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-10-16 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|