proz 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -1
- data/lib/proz/get_wiwo_entry.rb +5 -4
- data/lib/proz/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: b03c34d97ea4b3b3fcedb8b162f2b3432074d1db
|
4
|
+
data.tar.gz: b4d657e3ea8c34190e4b6613ec3879816eac1a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/proz/get_wiwo_entry.rb
CHANGED
@@ -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
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:
|
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-
|
11
|
+
date: 2016-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|