Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botrest

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botrest

rest api for development bots

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

botrest

version version

api-rest for bot development

introduction

this is an axio-based repository for requesting endpoints that use cookies for data authentication and website scraping.

usage

to use, import the modules using an npm install botrest --save and import into your project.

const botrest = require('botrest');
/* insert the base url to make the request (in the header field, insert the authentication parameters and or tokens. If not, add a null value: botrest('baseURL', {headers})*/ 
const rest = new botrest('https://iqoption.com/', null)
//get('/endpoint', {querystring: null})
rest.get('/api/appinit', null).then(rest => {
    console.log(rest)
})

suport

the system currently supports requests in POST and GET methods

  • NOTE: if the endpoints do not use body and or query, consider entering a null value: get('/endpoint', null) - post('/endpoint', null, null)
rest.get('/endpoint', {query: 'string'})

rest.post('/endpoint', {body: 'string'}, {query: 'string'})

Form Data

POST and GET formData methods are used to return absolute values ​​of requests made.

these values ​​can be filled with:

  • endpoint
  • body
  • query
  • header
  • encoding

rest.getFormData('/endpoint', {query: 'string'}, {header: 'string'}, 'utf8')

rest.postFormData('/endpoint', {query: 'string'}, {body: 'string'}, {header: 'string'}, 'utf8')

extra

some extra functions used are:

  • return of cookies
  • definition of agents
var cookie = rest.cookie()
console.log(cookie)
/* To use the agent definition, it is necessary to enter a numeric value. If this value is null, it will return a random agent: agtController('any') or agtController(2)*/
var agt = rest.agtController('any')
console.log(agt)

Keywords

FAQs

Package last updated on 25 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc