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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27361670f1e690b55285e69efc82a75afc0b741f
4
- data.tar.gz: b57ede160e52a77aeff237e95b39636e049ee353
3
+ metadata.gz: ce56796415fbd0457c7635f426ed7f272db6182d
4
+ data.tar.gz: e986249da1efbff28b2ba8737902fc3783275fde
5
5
  SHA512:
6
- metadata.gz: 3c7b4f507a997b1981e8d2ab613ae491cb611b66c04b07e010fd1fbbe6e2150a9a21615cbc12b35e575632e38498ac3742120ff251d87c59f9cefde9b0a08ff3
7
- data.tar.gz: 8fe53f7abb5bad6fa9fb58387b56f3ab4ad1574e123b97cf131f860f76cdfbf6f754a596c01f2a358f065ec48b2bcd20998684f59d0c32491a3195af50ddb153
6
+ metadata.gz: 8ccfa74152c5b474d47412443ad488fca67f7a3fb95d7df612ee301ac40df607a6c60149a4f9b243859e133ddb64a22efa8d3702122c58b0756d95389a93cc06
7
+ data.tar.gz: 2949a7f862770f4f4d3bba9e356d89292374218fb471f65eda77f993208df95ff912275c440646c7aff5e2d6ea8f1f2920d1402acece04269fc64c7214b02439
@@ -1,3 +1,3 @@
1
1
  module Proz
2
- VERSION = "0.0.19"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -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 :token
8
- def initialize(token:)
9
- @token = token
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: { 'Authorization' => "Bearer #{token}" })
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: { 'Authorization' => "Bearer #{token}" })
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias