k_sequencing 0.1 → 0.1.1
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 +4 -4
- data/README.md +42 -3
- data/docs/documentation.md +178 -12
- data/k_sequencing.gemspec +1 -1
- data/lib/k_sequencing/client.rb +4 -4
- data/lib/k_sequencing/version.rb +1 -1
- 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: 840c153f55aa0cd40d4ab1299863008213d4ed73
|
4
|
+
data.tar.gz: 4fb918dbd67d9d9b05d0cf631646f174a232277d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1de289a6a43c5df9030bee374eafdfe81a66ee97111b18aceb14f44d6d347338984bda115f1f285bd14023a88b39751feda06c5ad0decac53722cab65d31588e
|
7
|
+
data.tar.gz: a6403c30011bff0ee09e235de318c3d16fc2ac3340822bb870eb99c09bf6b46ed17379264661adb7692e7ed9908e4fff9b6a5d2cfaa23e06e9afdf8659fbdd70
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Image and content moderation services.
|
|
4
4
|
|
5
5
|
## Getting Started
|
6
6
|
|
7
|
-
KSequencing 0.1 works with Rails 4.1 onwards. You can add it to your Gemfile with:
|
7
|
+
KSequencing 0.1.1 works with Rails 4.1 onwards. You can add it to your Gemfile with:
|
8
8
|
```ruby
|
9
9
|
gem 'k_sequencing'
|
10
10
|
```
|
@@ -22,11 +22,50 @@ KSequencing.client.get_image_closed_questions()
|
|
22
22
|
| Field | Type | Required | Description |
|
23
23
|
| ------------- |:-------------:| :----:| :-----|
|
24
24
|
| token | string | Yes |Project Authorization Token|
|
25
|
-
| id |
|
26
|
-
|custom_id |
|
25
|
+
| id | string | No | Image id|
|
26
|
+
|custom_id | string | No | Client's image id |
|
27
27
|
|
28
28
|
Note: You must choose id or custom_id for search. Not both.
|
29
29
|
|
30
|
+
Sample request
|
31
|
+
```ruby
|
32
|
+
KSequencing.client.get_image_closed_question(
|
33
|
+
token: "9UPmGGWEwBsJrVnw6844tfpd",
|
34
|
+
id: "59311194e99991b2ca8979f1"
|
35
|
+
)
|
36
|
+
```
|
37
|
+
|
38
|
+
```
|
39
|
+
curl --request GET -H "Accept: application/json" -H "Authorization: 9UPmGGWEwBsJrVnw6844tfpd" "https://k-sequencing.datawow.io/api/images/closed_question?id=59311194e99991b2ca8979f1"
|
40
|
+
```
|
41
|
+
|
42
|
+
Sample results
|
43
|
+
```json
|
44
|
+
{
|
45
|
+
"data": {
|
46
|
+
"image": {
|
47
|
+
"id": "59311194e99991b2ca8979f1",
|
48
|
+
"answer": null,
|
49
|
+
"credit_charged": 0,
|
50
|
+
"custom_id": null,
|
51
|
+
"data": "image_url",
|
52
|
+
"deadline_at": "2017-06-02T07:19:48.574+00:00",
|
53
|
+
"postback_url": "www.example.com",
|
54
|
+
"processed_at": null,
|
55
|
+
"project_id": 3,
|
56
|
+
"staff_id": null,
|
57
|
+
"status": "unprocess",
|
58
|
+
"created_at": "2017-06-02T07:19:48.574Z",
|
59
|
+
"updated_at": "2017-06-02T07:19:48.574Z"
|
60
|
+
}
|
61
|
+
},
|
62
|
+
"meta": {
|
63
|
+
"code": 200,
|
64
|
+
"message": "success"
|
65
|
+
}
|
66
|
+
}
|
67
|
+
```
|
68
|
+
|
30
69
|
Create images
|
31
70
|
```ruby
|
32
71
|
KSequencing.client.create_image_closed_questions()
|
data/docs/documentation.md
CHANGED
@@ -9,17 +9,56 @@
|
|
9
9
|
#### Closed questions
|
10
10
|
Get image
|
11
11
|
```ruby
|
12
|
-
KSequencing.client.
|
12
|
+
KSequencing.client.get_image_closed_question()
|
13
13
|
```
|
14
14
|
|
15
15
|
| Field | Type | Required | Description |
|
16
16
|
| ------------- |:-------------:| :----:| :-----|
|
17
17
|
| token | string | Yes |Project Authorization Token|
|
18
|
-
| id |
|
19
|
-
|custom_id |
|
18
|
+
| id | string | No | Image id|
|
19
|
+
| custom_id | string | No | Client's image id |
|
20
20
|
|
21
21
|
Note: You must choose id or custom_id for search. Not both.
|
22
22
|
|
23
|
+
Sample request
|
24
|
+
```ruby
|
25
|
+
KSequencing.client.get_image_closed_question(
|
26
|
+
token: "9UPmGGWEwBsJrVnw6844tfpd",
|
27
|
+
id: "59311194e99991b2ca8979f1"
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
31
|
+
```
|
32
|
+
curl --request GET -H "Accept: application/json" -H "Authorization: 9UPmGGWEwBsJrVnw6844tfpd" "https://k-sequencing.datawow.io/api/images/closed_question?id=59311194e99991b2ca8979f1"
|
33
|
+
```
|
34
|
+
|
35
|
+
Sample results
|
36
|
+
```json
|
37
|
+
{
|
38
|
+
"data": {
|
39
|
+
"image": {
|
40
|
+
"id": "59311194e99991b2ca8979f1",
|
41
|
+
"answer": null,
|
42
|
+
"credit_charged": 0,
|
43
|
+
"custom_id": null,
|
44
|
+
"data": "image_url",
|
45
|
+
"deadline_at": "2017-06-02T07:19:48.574+00:00",
|
46
|
+
"postback_url": "www.example.com",
|
47
|
+
"processed_at": null,
|
48
|
+
"project_id": 3,
|
49
|
+
"staff_id": null,
|
50
|
+
"status": "unprocess",
|
51
|
+
"created_at": "2017-06-02T07:19:48.574Z",
|
52
|
+
"updated_at": "2017-06-02T07:19:48.574Z"
|
53
|
+
}
|
54
|
+
},
|
55
|
+
"meta": {
|
56
|
+
"code": 200,
|
57
|
+
"message": "success"
|
58
|
+
}
|
59
|
+
}
|
60
|
+
```
|
61
|
+
|
23
62
|
Create images
|
24
63
|
```ruby
|
25
64
|
KSequencing.client.create_image_closed_questions()
|
@@ -72,17 +111,64 @@ Sample results
|
|
72
111
|
#### Choices
|
73
112
|
Get image
|
74
113
|
```ruby
|
75
|
-
KSequencing.client.
|
114
|
+
KSequencing.client.get_image_choice()
|
76
115
|
```
|
77
116
|
|
78
117
|
| Field | Type | Required | Description |
|
79
118
|
| ------------- |:-------------:| :----:| :-----|
|
80
119
|
| token | string | Yes |Project Authorization Token|
|
81
|
-
| id |
|
82
|
-
|custom_id |
|
120
|
+
| id | string | No | Image id|
|
121
|
+
|custom_id | string | No | Client's image id |
|
83
122
|
|
84
123
|
Note: You must choose id or custom_id for search. Not both.
|
85
124
|
|
125
|
+
Sample request
|
126
|
+
```ruby
|
127
|
+
KSequencing.client.get_image_choice(
|
128
|
+
token: "9UPmGGWEwBsJrVnw6844tfpd",
|
129
|
+
id: "59311194e99991b2ca8979f1"
|
130
|
+
)
|
131
|
+
```
|
132
|
+
|
133
|
+
```
|
134
|
+
curl --request GET -H "Accept: application/json" -H "Authorization: 9UPmGGWEwBsJrVnw6844tfpd" "https://k-sequencing.datawow.io/api/images/choice?id=59311194e99991b2ca8979f1"
|
135
|
+
```
|
136
|
+
|
137
|
+
Sample results
|
138
|
+
```json
|
139
|
+
{
|
140
|
+
"data": {
|
141
|
+
"image": {
|
142
|
+
"id": "59311194e99991b2ca8979f1",
|
143
|
+
"answer": [
|
144
|
+
"approved"
|
145
|
+
],
|
146
|
+
"credit_charged": 0,
|
147
|
+
"custom_id": null,
|
148
|
+
"data": "image_url",
|
149
|
+
"deadline_at": "2017-06-01T07:18:02.350+00:00",
|
150
|
+
"postback_url": "www.example.com",
|
151
|
+
"instruction": "TEST instruction",
|
152
|
+
"categories": [
|
153
|
+
"approved",
|
154
|
+
"reject"
|
155
|
+
],
|
156
|
+
"project_id": 190,
|
157
|
+
"multiple": false,
|
158
|
+
"processed_at": "2017-06-01T07:23:17.494+00:00",
|
159
|
+
"staff_id": 26,
|
160
|
+
"status": "unprocess",
|
161
|
+
"created_at": "2017-06-01T07:18:02.350Z",
|
162
|
+
"updated_at": "2017-06-02T03:07:06.455Z"
|
163
|
+
}
|
164
|
+
},
|
165
|
+
"meta": {
|
166
|
+
"code": 200,
|
167
|
+
"message": "success"
|
168
|
+
}
|
169
|
+
}
|
170
|
+
```
|
171
|
+
|
86
172
|
Create new choices
|
87
173
|
```ruby
|
88
174
|
KSequencing.client.create_image_choices()
|
@@ -162,17 +248,57 @@ Sample results
|
|
162
248
|
#### Messages
|
163
249
|
Get image
|
164
250
|
```ruby
|
165
|
-
KSequencing.client.
|
251
|
+
KSequencing.client.get_image_message()
|
166
252
|
```
|
167
253
|
|
168
254
|
| Field | Type | Required | Description |
|
169
255
|
| ------------- |:-------------:| :----:| :-----|
|
170
256
|
| token | string | Yes |Project Authorization Token|
|
171
|
-
| id |
|
172
|
-
|custom_id |
|
257
|
+
| id | string | No | Image id|
|
258
|
+
|custom_id | string | No | Client's image id |
|
173
259
|
|
174
260
|
Note: You must choose id or custom_id for search. Not both.
|
175
261
|
|
262
|
+
Sample request
|
263
|
+
```ruby
|
264
|
+
KSequencing.client.get_image_message(
|
265
|
+
token: "9UPmGGWEwBsJrVnw6844tfpd",
|
266
|
+
id: "592fbfce1b9d8f69e4178688"
|
267
|
+
)
|
268
|
+
```
|
269
|
+
|
270
|
+
```
|
271
|
+
curl --request GET -H "Accept: application/json" -H "Authorization: 9UPmGGWEwBsJrVnw6844tfpd" "https://k-sequencing.datawow.io/api/images/message?id=592fbfce1b9d8f69e4178688"
|
272
|
+
```
|
273
|
+
|
274
|
+
Sample results
|
275
|
+
```json
|
276
|
+
{
|
277
|
+
"data": {
|
278
|
+
"image": {
|
279
|
+
"id": "592fbfce1b9d8f69e4178688",
|
280
|
+
"answer": null,
|
281
|
+
"credit_charged": 0,
|
282
|
+
"custom_id": null,
|
283
|
+
"data": "image_url",
|
284
|
+
"deadline_at": "2017-06-01T07:18:38.786+00:00",
|
285
|
+
"postback_url": "www.example.com",
|
286
|
+
"instruction": "Test",
|
287
|
+
"project_id": 190,
|
288
|
+
"processed_at": null,
|
289
|
+
"staff_id": null,
|
290
|
+
"status": "unprocess",
|
291
|
+
"created_at": "2017-06-01T07:18:38.786Z",
|
292
|
+
"updated_at": "2017-06-01T07:23:44.593Z"
|
293
|
+
}
|
294
|
+
},
|
295
|
+
"meta": {
|
296
|
+
"code": 200,
|
297
|
+
"message": "success"
|
298
|
+
}
|
299
|
+
}
|
300
|
+
```
|
301
|
+
|
176
302
|
Create new message
|
177
303
|
```ruby
|
178
304
|
KSequencing.client.create_image_messages()
|
@@ -228,17 +354,57 @@ Sample results
|
|
228
354
|
#### Photo tags
|
229
355
|
Get image
|
230
356
|
```ruby
|
231
|
-
KSequencing.client.
|
357
|
+
KSequencing.client.get_image_photo_tag()
|
232
358
|
```
|
233
359
|
|
234
360
|
| Field | Type | Required | Description |
|
235
361
|
| ------------- |:-------------:| :----:| :-----|
|
236
362
|
| token | string | Yes |Project Authorization Token|
|
237
|
-
| id |
|
238
|
-
|custom_id |
|
363
|
+
| id | string | No | Image id|
|
364
|
+
|custom_id | string | No | Client's image id |
|
239
365
|
|
240
366
|
Note: You must choose id or custom_id for search. Not both.
|
241
367
|
|
368
|
+
Sample request
|
369
|
+
```ruby
|
370
|
+
KSequencing.client.get_image_photo_tag(
|
371
|
+
token: "9UPmGGWEwBsJrVnw6844tfpd",
|
372
|
+
id: "592fbfec1b9d8f69e4178689"
|
373
|
+
)
|
374
|
+
```
|
375
|
+
|
376
|
+
```
|
377
|
+
curl --request GET -H "Accept: application/json" -H "Authorization: 9UPmGGWEwBsJrVnw6844tfpd" "https://k-sequencing.datawow.io/api/images/photo_tag?id=592fbfec1b9d8f69e4178689"
|
378
|
+
```
|
379
|
+
|
380
|
+
Sample results
|
381
|
+
```json
|
382
|
+
{
|
383
|
+
"data": {
|
384
|
+
"image": {
|
385
|
+
"id": "592fbfec1b9d8f69e4178689",
|
386
|
+
"answer": [],
|
387
|
+
"credit_charged": 0,
|
388
|
+
"custom_id": null,
|
389
|
+
"data": "image_url",
|
390
|
+
"deadline_at": "2017-06-01T07:19:08.587+00:00",
|
391
|
+
"postback_url": "www.example.com",
|
392
|
+
"instruction": "TEST",
|
393
|
+
"project_id": 190,
|
394
|
+
"processed_at": null,
|
395
|
+
"staff_id": null,
|
396
|
+
"status": "unprocess",
|
397
|
+
"created_at": "2017-06-01T07:19:08.587Z",
|
398
|
+
"updated_at": "2017-06-01T07:23:34.035Z"
|
399
|
+
}
|
400
|
+
},
|
401
|
+
"meta": {
|
402
|
+
"code": 200,
|
403
|
+
"message": "success"
|
404
|
+
}
|
405
|
+
}
|
406
|
+
```
|
407
|
+
|
242
408
|
Create new photo tag
|
243
409
|
```ruby
|
244
410
|
KSequencing.client.create_image_photo_tags()
|
data/k_sequencing.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'k_sequencing'
|
7
|
-
s.version = '0.1'
|
7
|
+
s.version = '0.1.1'
|
8
8
|
s.date = '2017-05-24'
|
9
9
|
s.summary = 'KSequencing is a moderator service for your online content'
|
10
10
|
s.description = 'Moderation suite'
|
data/lib/k_sequencing/client.rb
CHANGED
@@ -18,19 +18,19 @@ module KSequencing
|
|
18
18
|
connection.post("/api/images/photo_tags", options)
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
21
|
+
def get_image_choice(options = {})
|
22
22
|
connection.get("/api/images/choice", options)
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
25
|
+
def get_image_closed_question(options = {})
|
26
26
|
connection.get("/api/images/closed_question", options)
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def get_image_message(options = {})
|
30
30
|
connection.get("/api/images/message", options)
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
33
|
+
def get_image_photo_tag(options = {})
|
34
34
|
connection.get("/api/images/photo_tag", options)
|
35
35
|
end
|
36
36
|
|
data/lib/k_sequencing/version.rb
CHANGED