a_parser_client 0.1.4 → 0.1.5

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: 6f71276fa09063dd6d0cf2c34e0984012db13a0b7ddfc94cd1ed767b7b8f9a0c
4
- data.tar.gz: 80e89e4d2dba3cecf63115d3bbb98ed9f91dc4d4c237e48ad9684c7a2495d41d
3
+ metadata.gz: f42e60203410c99b0db06edc1788deee8e1c4ced464b10ef096e9e03de1676d5
4
+ data.tar.gz: 0d59de0239b5a7e25adb62591f00d39e235cf845954377e1eeab01ae7f645abe
5
5
  SHA512:
6
- metadata.gz: eb24c3067f99179faf8243174a1c3659604457974bf7627414336e826dae448336193cdb46c5238229d4a140ac944d5228d24e6c58765ef14780ba67cc13ac80
7
- data.tar.gz: 9172cfc1a07e776df45c85fb7b90b70f9217bd00dab44784d0e2639064c81cd34feb0c1f282b2694e0ed7360cd085b49055f6eb778b694af0547d2bcfd49cf7d
6
+ metadata.gz: 68e0a2dc347538a632f42dbd6bc02567636f31295aebfd17944bcd3473138fd80085d4a5bc74cbd506f810c99aadec220ea88ed1740e3ee87a7d93309eddf911
7
+ data.tar.gz: 3620212938726b6594e8dd8a952b866b506ab01ac6e1a1bcfd348ffd9a9e73155bbc6a7cb4467b2f0bb688983ee25a207630f00829c33910b2f362920f3c29d7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- a_parser_client (0.1.4)
4
+ a_parser_client (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # AParserClient
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/a_parser_client.svg)](https://badge.fury.io/rb/a_parser_client)
4
+
3
5
  Ruby client for A-Parser user API.
4
6
 
5
7
  This is a test release, more API coverage is upcoming.
@@ -13,19 +15,21 @@ Covered for now:
13
15
  - getTaskConf
14
16
  - addTask
15
17
  - changeTaskStatus
18
+ - getAccountsCount
19
+ - getProxies
20
+ - update
21
+ - getTaskResultsFile
22
+ - deleteTaskResultsFile
23
+ - moveTask
24
+ - getParserInfo
25
+ - getParserPreset
16
26
 
17
27
  TODO:
18
28
 
19
29
  - oneRequest
20
30
  - bulkRequest
21
- - getParserPreset
22
- - getProxies
23
- - getTaskResultsFile
24
- - deleteTaskResultsFile
25
- - moveTask
26
- - getParserInfo
27
- - update
28
- - getAccountsCount
31
+
32
+
29
33
 
30
34
  ## Installation
31
35
 
@@ -45,6 +49,10 @@ Or install it yourself as:
45
49
 
46
50
  ## Usage
47
51
 
52
+ There will be a wiki page soon.
53
+
54
+ The code sample below is all for now...
55
+
48
56
  ```ruby
49
57
  require 'a_parser_client'
50
58
 
@@ -70,4 +78,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
70
78
 
71
79
  ## Code of Conduct
72
80
 
73
- Everyone interacting in the AParserClient project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yvshevchenko /a_parser_client/blob/master/CODE_OF_CONDUCT.md).
81
+ Everyone interacting in the AParserClient project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yvshevchenko/a_parser_client/blob/master/CODE_OF_CONDUCT.md).
@@ -98,6 +98,87 @@ module AParserClient
98
98
  do_it request
99
99
  end
100
100
 
101
+ def get_accounts_count
102
+ request = {
103
+ password: @api_password,
104
+ action: 'getAccountsCount',
105
+ data: {}
106
+ }
107
+ do_it request
108
+ end
109
+
110
+
111
+ def get_proxies
112
+ request = {
113
+ password: @api_password,
114
+ action: 'getProxies'
115
+ }
116
+ do_it request
117
+ end
118
+
119
+ def update!
120
+ request = {
121
+ password: @api_password,
122
+ action: 'update',
123
+ data: {}
124
+ }
125
+ do_it request
126
+ end
127
+
128
+ def get_task_results_file(task_id)
129
+ request = {
130
+ password: @api_password,
131
+ action: 'getTaskResultsFile',
132
+ data: {taskUid: task_id}
133
+ }
134
+ do_it request
135
+ end
136
+
137
+ def delete_task_results_file(task_id)
138
+ request = {
139
+ password: @api_password,
140
+ action: 'deleteTaskResultsFile',
141
+ data: {taskUid: task_id}
142
+ }
143
+ do_it request
144
+ end
145
+
146
+ def move_task(task_id, direction)
147
+ request = {
148
+ password: @api_password,
149
+ action: 'moveTask',
150
+ data: {
151
+ taskUid: task_id,
152
+ toStatus: direction
153
+ }
154
+ }
155
+ do_it request
156
+ end
157
+
158
+ def get_parser_info(parser_name)
159
+ request = {
160
+ password: @api_password,
161
+ action: 'getParserInfo',
162
+ data: {
163
+ parser: parser_name
164
+ }
165
+ }
166
+ do_it request
167
+ end
168
+
169
+
170
+ def get_parser_preset(parser_name, preset_name)
171
+ request = {
172
+ password: @api_password,
173
+ action: 'getParserInfo',
174
+ data: {
175
+ parser: parser_name,
176
+ reset: preset_name
177
+ }
178
+ }
179
+ do_it request
180
+ end
181
+
101
182
 
102
183
  private # internal use only
103
184
 
@@ -1,3 +1,3 @@
1
1
  module AParserClient
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
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.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shevchenko