proz 0.0.10 → 0.0.11
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_entry.rb +7 -8
- 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: a5377f16f43daab2d38f4ad15579a3ce0ce02a2b
|
4
|
+
data.tar.gz: 2a61ffa54091fbe23dd4fb0de5d754bd4c28ebce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9524940ad779fa3e90c05ecc098d6ef0049604845802b87322e87e013af4ae71608b914c6fe48e320cd4baa6041bf82c741f39553ea54e31c3fe8c87468c529a
|
7
|
+
data.tar.gz: 4cd865ddcdd8f0ce00b977ec40bdb806a80a11bafd2be68351e6c4b8d1179ee182cd5506fa179e589c84cb15ea2199b3a2a444f2ade45fa150a0f1fe579e5677
|
data/lib/proz/version.rb
CHANGED
data/lib/proz/wiwo_entry.rb
CHANGED
@@ -4,19 +4,18 @@ module Proz
|
|
4
4
|
class WiwoEntry
|
5
5
|
include HTTParty
|
6
6
|
base_uri "https://api.proz.com/v2"
|
7
|
-
attr_reader :token, :message
|
8
|
-
def initialize(token:, message
|
7
|
+
attr_reader :token, :message, :options
|
8
|
+
def initialize(token:, message:, **options)
|
9
9
|
@token = token
|
10
|
-
@message = message
|
10
|
+
@message = { message: message }
|
11
|
+
@options = options
|
11
12
|
end
|
12
13
|
|
13
14
|
def post
|
15
|
+
body = message.merge!(options)
|
14
16
|
self.class.post("/workstatus",
|
15
|
-
body:
|
16
|
-
source_language: "eng",
|
17
|
-
target_language: "spa",
|
18
|
-
wordcount: "234" },
|
17
|
+
body: body,
|
19
18
|
headers: { 'Authorization' => "Bearer #{token}" } )
|
20
19
|
end
|
21
20
|
end
|
22
|
-
end
|
21
|
+
end
|