EPO OPS WRAPPER
wrapper for EPO OPS version 3.2 request
FEATURE
- http SYNC requesting using fibers/future
- proxy based request randomization
- automatic token expiry handler
install
with npm do:
npm install EPO_OPS_WRAPPER
usage
for checking IPC=A[q=IC%3DA]
details
var ops = ;console;
require('EPO_OPS_WRAPPER')(opt)
@return APP[Object]
opt | type | description |
---|---|---|
proxy_list | Array of String |
[optional] format http://ip:port OR http://usename:password@ip:port |
timeout | Number |
[optional] timeout for http request [default => 1000 * 60] |
var ops = proxy_list: 'http://ip:port' 'http://usename:password@ip:port' timeout: 1000 * 30;
.signIn(opt)
for consumer_key & consumer_secret based signIn, all .request()
call after this use access_token if it success
opt | type | description |
---|---|---|
consumer_key | String |
for registered user |
consumer_secret | String |
for registered user |
@return true if it success, otherwise null with console.log(error)
access_token: String application_name: String client_id: String 'developer.email': 'linto.cet@gmail.com' expires_in: '1200' issued_at: status: 'approved' token_type: 'BearerToken'
this package automatically handle access_token expiry
var ops = proxy_list: 'http://ip:port' 'http://usename:password@ip:port'; console;console;
.request(relative_url, method, form)
EPO OPS service SYNC http request, @return [Object]
opt | type | description |
---|---|---|
relative_url | String |
https://ops.epo.org/3.2/[relative_url] |
method | String |
default => GET |
form | Object |
for POST data |