boxrec-requests
TypeScript icon, indicating that this package has built-in type declarations

6.1.0 • Public • Published

BoxRec Requests

npm version Known Vulnerabilities Codacy Badge

This project makes HTTP requests to BoxRec and returns the HTML body.
The main purpose of this project is for other projects to easily make requests and return the HTML.

Installation

yarn add -D boxrec-requests or npm install -D boxrec-requests

Setup

import {BoxrecRequests} from "boxrec-requests";

or

const BoxrecRequests = require("boxrec-requests").BoxrecRequests;

Usage

All responses are promises. It is highly suggested that you log into BoxRec before hand like this

const cookieJar = await BoxrecRequests.login(BOXREC_USERNAME, BOXREC_PASSWORD); // returns a cookieJar (your log in cookie)
await BoxrecRequests.getPersonById(cookieJar, 352); // makes next request as a logged in user

BoxRec returns additional data if you're logged in. It's recommended that you log in.
Store the cookie so you can reuse it to lower the amount of log in requests that you make to BoxRec

Todo

Needs proper CI/CD with E2E tests and not mocks

Readme

Keywords

Package Sidebar

Install

npm i boxrec-requests

Weekly Downloads

45

Version

6.1.0

License

MIT

Unpacked Size

114 kB

Total Files

14

Last publish

Collaborators

  • mikedidomizio