GetYourBit.com client
This library allows you to make requests easily.
Examples
const GetYourBit = ;const api = 'https://ip.getyourbit.com'; api;
Api
.auth(login, password, options={})
Login to the API. You can get login and password on the site after a subscription.
options is request module options.
Free services don't require authorization.
.logout()
Logout from the API. It gives an error without authorization before.
.request(url, data={}, options={})
Request to the API without scrolling to get data.
It returns all response body as object.
.scroll(url, data={}, options={}, callback=null)
.scroll(url, data={}, callback=null)
.scroll(url, callback=null)
Request to the API with scrolling to get data. You can pass callback to control every chunk. You will get three arguments:
- body - chunk response body
- chunkData - chunk data
- fullData - full data by the current chunk
It returns the full data at the end