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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22f8b6c17477106cec46e6bd45d03be6c369e36e77ebab5f030defe60d17d2c6
4
- data.tar.gz: 49285e64aa071ad88629c6f98d1fadc26999aecd59228ff4cd3d11bcebd9d60c
3
+ metadata.gz: adc4f9ce094b307b0dd2498562c9b3fed6046550336547e894c75fc480dbfe52
4
+ data.tar.gz: fea8994be0bfb6ecb417fbabf5c4c956aa71d21b3e2543ea0a1777d9ff0e0525
5
5
  SHA512:
6
- metadata.gz: 9e8c2a60e972b22ecc1a654f9d8881564f20b2b4458495ac974e1e88262fecf109cc42f7259d23b79c47613ff2acbc3e8d28b0426e66a66eb0daf4f0ce3c86c1
7
- data.tar.gz: '0694ff64734fa5f06bb5ca2abbddbf1f5e71f2ca8ff664be1f755cf91c79bc4450f8ebdadc04f14021c5d7d1292b651883d2b6814d723bef5e4d01b777843050'
6
+ metadata.gz: 0b752657ce7da0730c2b374ded49bd58031b23a55bc0b18b5f71db130c8ca5bb54dd842226d8b68e00cf32dac418d5baec6dc2cd3d0d7207a52f7aa68e5cec10
7
+ data.tar.gz: e2ce75960aae66819ba31e785b9a368178dd9aae2e08a1897a1c112158f3e16fc63ddd42cd642cb50b483a0a1e75b81e6c4225cdc7635d2ec080a40de8301cf2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- a_parser_client (0.1.2)
4
+ a_parser_client (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
- TODO: Write usage instructions here
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
 
@@ -46,7 +46,7 @@ module AParserClient
46
46
  def get_task_state(task_id)
47
47
  request = {
48
48
  password: @api_password,
49
- action: 'getTasksState',
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: 'getTasksConf',
58
+ action: 'getTaskConf',
59
59
  data: {taskUid: task_id}
60
60
  }
61
61
  do_it request
@@ -1,3 +1,3 @@
1
1
  module AParserClient
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: a_parser_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shevchenko