proz 1.0.0 → 2.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6367453ab1a5c9097d24f789a1483f24f27e22b0
4
- data.tar.gz: cdc37ca31e412e4d18d31d5351acbe598415920b
3
+ metadata.gz: b03c34d97ea4b3b3fcedb8b162f2b3432074d1db
4
+ data.tar.gz: b4d657e3ea8c34190e4b6613ec3879816eac1a21
5
5
  SHA512:
6
- metadata.gz: f40122fe7d4e9e908f0c68b29fa077e199f943e66e26c0b1c53cefa8b60d4effddcd28c98eb62b850e891f1674025b76e8fbd38590b23ff6177fa5591523f4c1
7
- data.tar.gz: 9dfe889444c2f76da5ba712b0ad1a6cd58d1134e49cc513e314dce652ae81ec8a271c2cc9dc467dc1ba0f417ced7205c227964c10ef1d4b964a0732ae9a7d02f
6
+ metadata.gz: 96600845b6f83b95079bfa40d366a25e0d8673d79282177ce55d09b0488a44088dd70f4bff34f0db2e11341351e52d90a3d310fe2666ab8251f67fd4db3263f7
7
+ data.tar.gz: ef0fc7db62f2eef884591b62873940cbb331b5085c73d0937aa11e3304df64ce4df7ddf95491b3628d98599cc4ab8d120948e54510b91c8abe74ece5abd308d6
data/README.md CHANGED
@@ -178,12 +178,14 @@ GET WIWO (OAuth2)
178
178
  # Get user's WIWOs (public + private)
179
179
  Proz::GetWiwoEntry.new(
180
180
  token: 'access_token',
181
+ user_uuid: '7ccfee74-a2a4-484f-8dbc-215a67026ce1',
181
182
  include_private: true
182
183
  ).get
183
184
 
184
185
  # Get user's WIWOs (public only)
185
186
  Proz::GetWiwoEntry.new(
186
187
  token: 'access_token',
188
+ user_uuid: '7ccfee74-a2a4-484f-8dbc-215a67026ce1',
187
189
  include_private: false
188
190
  ).get
189
191
 
@@ -202,6 +204,13 @@ Send a JSON object with the following fields. Only the "message" is required.
202
204
  * wordcount (int) - the number of words completed
203
205
  * public (boolean) - whether or not the status update should be publicly visible.
204
206
  * cat_tool (string) - A free-text name of the CAT tool in use, if any.
207
+ * percent_complete (int) - An integer from 0 - 100 describing the completion of the project the translator is working on.
208
+ * busy_meter (int) - An integer from 1 - 5 describing how busy the translator is.
209
+ * location (hash)
210
+ - latitude (decimal) - Latitude location where the translator is sending the message from.
211
+ - longitude (decimal) - Longitude location where the translator is sending the message from.
212
+ - show_location (boolean) - Allow the submitted location to be shown in the status update.
213
+ * representative_terms (array) - Up to 5 representative terms fron the source document the translator is working on.
205
214
 
206
215
  ```
207
216
  Proz::PostWiwoEntry.new(
@@ -213,7 +222,15 @@ Proz::PostWiwoEntry.new(
213
222
  discipline: "automotive",
214
223
  message_language: "eng",
215
224
  public: 1,
216
- cat_tool: "Awesome CAT"
225
+ cat_tool: "Awesome CAT",
226
+ percent_complete: 95,
227
+ busy_meter: 5,
228
+ location: {
229
+ latitude: 40.706872,
230
+ longitude: -74.011254,
231
+ show_location: 1
232
+ }
233
+ representative_terms: ['term 1', 'term 2', 'term 3', 'term 4', 'term 5']
217
234
  ).post
218
235
  ```
219
236
 
@@ -4,18 +4,19 @@ module Proz
4
4
  class GetWiwoEntry
5
5
  include HTTParty
6
6
  base_uri "https://api.proz.com/v2"
7
- attr_reader :token, :include_private
8
- def initialize(token:, include_private:)
7
+ attr_reader :token, :user_uuid, :include_private
8
+ def initialize(token:, user_uuid:, include_private:)
9
9
  @token = token
10
10
  @include_private = include_private
11
+ @user_uuid = user_uuid
11
12
  end
12
13
 
13
14
  def get
14
15
  if include_private
15
- self.class.get("/wiwo?include_private=1",
16
+ self.class.get("/wiwo?user_uuid=" + user_uuid + "?include_private=1",
16
17
  headers: { 'Authorization' => "Bearer #{token}" } )
17
18
  else
18
- self.class.get("/wiwo",
19
+ self.class.get("/wiwo?user_uuid=" + user_uuid,
19
20
  headers: { 'Authorization' => "Bearer #{token}" } )
20
21
  end
21
22
  end
data/lib/proz/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Proz
2
- VERSION = "1.0.0"
2
+ VERSION = "2.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proz
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-14 00:00:00.000000000 Z
11
+ date: 2016-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler