proz 2.0.1 → 2.1.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 +59 -2
- data/lib/proz.rb +5 -1
- data/lib/proz/delete_wiwo_entry.rb +17 -0
- data/lib/proz/delete_wiwo_reply.rb +18 -0
- data/lib/proz/patch_wiwo_entry.rb +20 -0
- data/lib/proz/patch_wiwo_reply.rb +21 -0
- data/lib/proz/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10a2865dae4f92b6df14cb04d88e337efadc18fb
|
4
|
+
data.tar.gz: 91f4c2ff1b2cbe087e67a1c48121b0f20374eac5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4d5703d88560e6494e4e16b799d1df10b6c08ffd474d186516771d46265d8bd6076f9462170c487b0103da555df7a6a735e4ff25279c334af896eef97ae31e5
|
7
|
+
data.tar.gz: e9b5be0aa8af8e4027386f6b4dd1aa94ddadde645fa2ce9b7db181cf44350d6545c5f2db68fb7413830a87dbdc0b0694645b0eaeefe39a95c0024d6c871414dc
|
data/README.md
CHANGED
@@ -102,7 +102,7 @@ Proz::GetWiwoEntry.new(
|
|
102
102
|
|
103
103
|
POST WIWO
|
104
104
|
|
105
|
-
Uses OAuth2 with the `wiwo
|
105
|
+
Uses OAuth2 with the `wiwo` default scope. Use the [omniauth-proz](https://github.com/diasks2/omniauth-proz) gem to easily authenticate.
|
106
106
|
|
107
107
|
Send a JSON object with the following fields. Only the "message" is required.
|
108
108
|
* message (string) - a plain text message.
|
@@ -143,9 +143,39 @@ Proz::PostWiwoEntry.new(
|
|
143
143
|
).post
|
144
144
|
```
|
145
145
|
|
146
|
+
PATCH WIWO
|
147
|
+
|
148
|
+
Uses OAuth2 with the `wiwo` default scope. Use the [omniauth-proz](https://github.com/diasks2/omniauth-proz) gem to easily authenticate.
|
149
|
+
|
150
|
+
```
|
151
|
+
Proz::PatchWiwoEntry.new(
|
152
|
+
token: 'access_token',
|
153
|
+
wiwo_id: 'wiwo_id',
|
154
|
+
message: "Hello World",
|
155
|
+
source_language: "eng",
|
156
|
+
target_language: "esp",
|
157
|
+
wordcount: 500,
|
158
|
+
discipline: "automotive",
|
159
|
+
message_language: "eng",
|
160
|
+
public: 1,
|
161
|
+
cat_tool: "Awesome CAT"
|
162
|
+
).patch
|
163
|
+
```
|
164
|
+
|
165
|
+
DELETE WIWO
|
166
|
+
|
167
|
+
Uses OAuth2 with the `wiwo` default scope. Use the [omniauth-proz](https://github.com/diasks2/omniauth-proz) gem to easily authenticate.
|
168
|
+
|
169
|
+
```ruby
|
170
|
+
Proz::DeleteWiwoEntry.new(
|
171
|
+
token: 'access_token',
|
172
|
+
wiwo_id: 'wiwo_id'
|
173
|
+
).delete
|
174
|
+
```
|
175
|
+
|
146
176
|
POST Reply
|
147
177
|
|
148
|
-
Uses OAuth2 with the `wiwo
|
178
|
+
Uses OAuth2 with the `wiwo` default scope. Use the [omniauth-proz](https://github.com/diasks2/omniauth-proz) gem to easily authenticate.
|
149
179
|
|
150
180
|
Send a JSON object with the following fields. Only the "message" is required.
|
151
181
|
* id (string) - id of the parent wiwo
|
@@ -161,6 +191,33 @@ Proz::PostWiwoReply.new(
|
|
161
191
|
).post
|
162
192
|
```
|
163
193
|
|
194
|
+
PATCH Reply
|
195
|
+
|
196
|
+
Uses OAuth2 with the `wiwo` default scope. Use the [omniauth-proz](https://github.com/diasks2/omniauth-proz) gem to easily authenticate.
|
197
|
+
|
198
|
+
```ruby
|
199
|
+
Proz::PatchWiwoReply.new(
|
200
|
+
token: 'access_token',
|
201
|
+
wiwo_id: 'wiwo_id'
|
202
|
+
wiwo_reply_id: 'wiwo_reply_id',
|
203
|
+
message: 'message',
|
204
|
+
message_language: 'message_language'
|
205
|
+
).patch
|
206
|
+
```
|
207
|
+
|
208
|
+
DELETE Reply
|
209
|
+
|
210
|
+
Uses OAuth2 with the `wiwo` default scope. Use the [omniauth-proz](https://github.com/diasks2/omniauth-proz) gem to easily authenticate.
|
211
|
+
|
212
|
+
```ruby
|
213
|
+
Proz::DeleteWiwoReply.new(
|
214
|
+
token: 'access_token',
|
215
|
+
wiwo_id: 'wiwo_id'
|
216
|
+
wiwo_reply_id: 'wiwo_reply_id'
|
217
|
+
).delete
|
218
|
+
```
|
219
|
+
|
220
|
+
|
164
221
|
### OAuth2
|
165
222
|
|
166
223
|
To Setup Your App with ProZ OAuth2:
|
data/lib/proz.rb
CHANGED
@@ -6,4 +6,8 @@ require "proz/freelancer_matches"
|
|
6
6
|
require "proz/post_wiwo_entry"
|
7
7
|
require "proz/get_wiwo_entry"
|
8
8
|
require "proz/wiwo_entries"
|
9
|
-
require "proz/post_wiwo_reply"
|
9
|
+
require "proz/post_wiwo_reply"
|
10
|
+
require "proz/delete_wiwo_entry"
|
11
|
+
require "proz/delete_wiwo_reply"
|
12
|
+
require "proz/patch_wiwo_entry"
|
13
|
+
require "proz/patch_wiwo_reply"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
|
3
|
+
module Proz
|
4
|
+
class DeleteWiwoEntry
|
5
|
+
include HTTParty
|
6
|
+
base_uri "https://api.proz.com/v2"
|
7
|
+
attr_reader :token, :wiwo_id
|
8
|
+
def initialize(token:, wiwo_id:)
|
9
|
+
@token = token
|
10
|
+
@wiwo_id = wiwo_id
|
11
|
+
end
|
12
|
+
|
13
|
+
def delete
|
14
|
+
self.class.delete("/wiwo/#{wiwo_id}", headers: { 'Authorization' => "Bearer #{token}" } )
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
|
3
|
+
module Proz
|
4
|
+
class DeleteWiwoReply
|
5
|
+
include HTTParty
|
6
|
+
base_uri "https://api.proz.com/v2"
|
7
|
+
attr_reader :token, :wiwo_id, :wiwo_reply_id
|
8
|
+
def initialize(token:, wiwo_id:, wiwo_reply_id:)
|
9
|
+
@token = token
|
10
|
+
@wiwo_id = wiwo_id
|
11
|
+
@wiwo_reply_id = wiwo_reply_id
|
12
|
+
end
|
13
|
+
|
14
|
+
def delete
|
15
|
+
self.class.delete("/wiwo/#{wiwo_id}/replies/#{wiwo_reply_id}", headers: { 'Authorization' => "Bearer #{token}" } )
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
|
3
|
+
module Proz
|
4
|
+
class PatchWiwoEntry
|
5
|
+
include HTTParty
|
6
|
+
base_uri "https://api.proz.com/v2"
|
7
|
+
attr_reader :token, :wiwo_id, :options
|
8
|
+
def initialize(token:, wiwo_id:, **options)
|
9
|
+
@token = token
|
10
|
+
@wiwo_id = wiwo_id
|
11
|
+
@options = options
|
12
|
+
end
|
13
|
+
|
14
|
+
def patch
|
15
|
+
self.class.patch("/wiwo/#{wiwo_id}",
|
16
|
+
body: options,
|
17
|
+
headers: { 'Authorization' => "Bearer #{token}" } )
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
|
3
|
+
module Proz
|
4
|
+
class PatchWiwoReply
|
5
|
+
include HTTParty
|
6
|
+
base_uri "https://api.proz.com/v2"
|
7
|
+
attr_reader :token, :wiwo_id, :wiwo_reply_id, :options
|
8
|
+
def initialize(token:, wiwo_id:, wiwo_reply_id:, **options)
|
9
|
+
@token = token
|
10
|
+
@wiwo_id = wiwo_id
|
11
|
+
@wiwo_reply_id = wiwo_reply_id
|
12
|
+
@options = options
|
13
|
+
end
|
14
|
+
|
15
|
+
def patch
|
16
|
+
self.class.patch("/wiwo/#{wiwo_id}/replies/#{wiwo_reply_id}",
|
17
|
+
body: options,
|
18
|
+
headers: { 'Authorization' => "Bearer #{token}" } )
|
19
|
+
end
|
20
|
+
end
|
21
|
+
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: 2.0
|
4
|
+
version: 2.1.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-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -138,10 +138,14 @@ files:
|
|
138
138
|
- README.md
|
139
139
|
- Rakefile
|
140
140
|
- lib/proz.rb
|
141
|
+
- lib/proz/delete_wiwo_entry.rb
|
142
|
+
- lib/proz/delete_wiwo_reply.rb
|
141
143
|
- lib/proz/freelancer.rb
|
142
144
|
- lib/proz/freelancer_matches.rb
|
143
145
|
- lib/proz/get_wiwo_entry.rb
|
144
146
|
- lib/proz/oauth.rb
|
147
|
+
- lib/proz/patch_wiwo_entry.rb
|
148
|
+
- lib/proz/patch_wiwo_reply.rb
|
145
149
|
- lib/proz/post_wiwo_entry.rb
|
146
150
|
- lib/proz/post_wiwo_reply.rb
|
147
151
|
- lib/proz/profile.rb
|