a_parser_client 0.1.2 → 0.1.3
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/Gemfile.lock +1 -1
- data/README.md +35 -1
- data/lib/a_parser_client.rb +2 -2
- data/lib/a_parser_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adc4f9ce094b307b0dd2498562c9b3fed6046550336547e894c75fc480dbfe52
|
4
|
+
data.tar.gz: fea8994be0bfb6ecb417fbabf5c4c956aa71d21b3e2543ea0a1777d9ff0e0525
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b752657ce7da0730c2b374ded49bd58031b23a55bc0b18b5f71db130c8ca5bb54dd842226d8b68e00cf32dac418d5baec6dc2cd3d0d7207a52f7aa68e5cec10
|
7
|
+
data.tar.gz: e2ce75960aae66819ba31e785b9a368178dd9aae2e08a1897a1c112158f3e16fc63ddd42cd642cb50b483a0a1e75b81e6c4225cdc7635d2ec080a40de8301cf2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# AParserClient
|
2
2
|
|
3
|
+
Ruby client for A-Parser user API.
|
4
|
+
|
5
|
+
This is a test release, more API coverage is upcoming.
|
6
|
+
|
7
|
+
Covered for now:
|
8
|
+
|
9
|
+
- ping
|
10
|
+
- info
|
11
|
+
- getTaskList
|
12
|
+
- getTaskState
|
13
|
+
- getTaskConf
|
14
|
+
- addTask
|
15
|
+
- changeTaskStatus
|
16
|
+
|
17
|
+
TODO:
|
18
|
+
|
19
|
+
- oneRequest
|
20
|
+
- bulkRequest
|
21
|
+
- getParserPreset
|
22
|
+
- getProxies
|
23
|
+
- getTaskResultsFile
|
24
|
+
- deleteTaskResultsFile
|
25
|
+
- moveTask
|
26
|
+
- getParserInfo
|
27
|
+
- update
|
28
|
+
- getAccountsCount
|
29
|
+
|
3
30
|
## Installation
|
4
31
|
|
5
32
|
Add this line to your application's Gemfile:
|
@@ -18,7 +45,14 @@ Or install it yourself as:
|
|
18
45
|
|
19
46
|
## Usage
|
20
47
|
|
21
|
-
|
48
|
+
```ruby
|
49
|
+
require 'a_parser_client'
|
50
|
+
|
51
|
+
api = AParserClient::API.new 'http://142.54.182.130:9091/API, ''
|
52
|
+
api.ping
|
53
|
+
|
54
|
+
$> {"success" : 1, "data" : "pong"}
|
55
|
+
```
|
22
56
|
|
23
57
|
## Development
|
24
58
|
|
data/lib/a_parser_client.rb
CHANGED
@@ -46,7 +46,7 @@ module AParserClient
|
|
46
46
|
def get_task_state(task_id)
|
47
47
|
request = {
|
48
48
|
password: @api_password,
|
49
|
-
action: '
|
49
|
+
action: 'getTaskState',
|
50
50
|
data: {taskUid: task_id}
|
51
51
|
}
|
52
52
|
do_it request
|
@@ -55,7 +55,7 @@ module AParserClient
|
|
55
55
|
def get_task_conf(task_id)
|
56
56
|
request = {
|
57
57
|
password: @api_password,
|
58
|
-
action: '
|
58
|
+
action: 'getTaskConf',
|
59
59
|
data: {taskUid: task_id}
|
60
60
|
}
|
61
61
|
do_it request
|