outreach 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/outreach/request.rb +20 -4
- data/lib/outreach/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a10c78843683a030051a42d197d7aa67c4059fd4
|
4
|
+
data.tar.gz: 5045736b7b892177fe963064c0957992a63393a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3adb9d073c6ed0b4e6aebff27166430e4975e25d107e8549adf98192ff46a82cafd8c83432b73d4752470d688883a92f3fcb14c7d15560271015e0ca3cd27371
|
7
|
+
data.tar.gz: d8902b4f3a053bfc7b3c957c0f4cacb044b55770fd31bb22a6a5ab99c13383dee65f55ab647736732ec914afcc7630e077317bef8ffdd5572da6648542843456
|
data/lib/outreach/request.rb
CHANGED
@@ -13,24 +13,40 @@ module Outreach
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def get(url, query={})
|
16
|
-
|
16
|
+
attrs = {
|
17
|
+
query: query, headers: auth_header
|
18
|
+
}
|
19
|
+
attrs[:debug_output] = $stdout if Outreach.debug
|
20
|
+
response = HTTParty.get(url, attrs)
|
17
21
|
parse_response(response)
|
18
22
|
end
|
19
23
|
|
20
24
|
def post(url, params)
|
21
25
|
response_format = params.delete(:response_format) || :json
|
22
|
-
|
26
|
+
attrs = {
|
27
|
+
body: params.to_json, headers: auth_header
|
28
|
+
}
|
29
|
+
attrs[:debug_output] = $stdout if Outreach.debug
|
30
|
+
response = HTTParty.post(url, attrs)
|
23
31
|
parse_response(response, response_format)
|
24
32
|
end
|
25
33
|
|
26
34
|
def patch(url, params)
|
27
35
|
response_format = params.delete(:response_format) || :json
|
28
|
-
|
36
|
+
attrs = {
|
37
|
+
body: params.to_json, headers: auth_header
|
38
|
+
}
|
39
|
+
attrs[:debug_output] = $stdout if Outreach.debug
|
40
|
+
response = HTTParty.patch(url, attrs)
|
29
41
|
parse_response(response, response_format)
|
30
42
|
end
|
31
43
|
|
32
44
|
def delete(url)
|
33
|
-
|
45
|
+
attrs = {
|
46
|
+
headers: auth_header
|
47
|
+
}
|
48
|
+
attrs[:debug_output] = $stdout if Outreach.debug
|
49
|
+
response = HTTParty.delete(url, attrs)
|
34
50
|
parse_response(response)
|
35
51
|
end
|
36
52
|
|
data/lib/outreach/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: outreach
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris O'Sullivan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|