proz 0.0.19 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/proz/version.rb +1 -1
- data/lib/proz/wiwo_entries.rb +13 -5
- 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: ce56796415fbd0457c7635f426ed7f272db6182d
|
4
|
+
data.tar.gz: e986249da1efbff28b2ba8737902fc3783275fde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ccfa74152c5b474d47412443ad488fca67f7a3fb95d7df612ee301ac40df607a6c60149a4f9b243859e133ddb64a22efa8d3702122c58b0756d95389a93cc06
|
7
|
+
data.tar.gz: 2949a7f862770f4f4d3bba9e356d89292374218fb471f65eda77f993208df95ff912275c440646c7aff5e2d6ea8f1f2920d1402acece04269fc64c7214b02439
|
data/lib/proz/version.rb
CHANGED
data/lib/proz/wiwo_entries.rb
CHANGED
@@ -4,17 +4,25 @@ module Proz
|
|
4
4
|
class WiwoEntries
|
5
5
|
include HTTParty
|
6
6
|
base_uri "https://api.proz.com/v2"
|
7
|
-
attr_reader :
|
8
|
-
def initialize(
|
9
|
-
@
|
7
|
+
attr_reader :api_key
|
8
|
+
def initialize(api_key:)
|
9
|
+
@api_key = api_key
|
10
10
|
end
|
11
11
|
|
12
12
|
def entries
|
13
|
-
self.class.get("/wiwo", headers: { '
|
13
|
+
self.class.get("/wiwo", headers: { 'X-Proz-API-Key' => api_key })
|
14
|
+
end
|
15
|
+
|
16
|
+
def wiwo_entries
|
17
|
+
self.class.get("/wiwo", headers: { 'X-Proz-API-Key' => api_key }).entries["wiwos"]
|
18
|
+
end
|
19
|
+
|
20
|
+
def user_entries
|
21
|
+
self.class.get("/wiwo", headers: { 'X-Proz-API-Key' => api_key }).entries["users"]
|
14
22
|
end
|
15
23
|
|
16
24
|
def user_entries(user_uuid)
|
17
|
-
self.class.get("/wiwo?user_uuid=" + user_uuid, headers: { '
|
25
|
+
self.class.get("/wiwo?user_uuid=" + user_uuid, headers: { 'X-Proz-API-Key' => api_key })
|
18
26
|
end
|
19
27
|
end
|
20
28
|
end
|