Package Exports
- aaron-api-client
- aaron-api-client/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aaron-api-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
api-client
Installing
$ npm install aaron-api-client
Launch connection
const aaron = require('aaron-api-client')
aaron.init({
email: "your-mail@aaronlem.ovh",
password: "password",
url: "aaronlem.ovh/api/", // Optionnal, not recommanded
protocol: "https" // Optionnal, not recommanded
})
Send request
Example request to get all colors
aaron.send({
method: "get",
url: "/countriesByIds",
data: ["626610113a1008f5c52eaaec", "626610113a1008f5c52eaae9"] // This is the request body
}).catch(console.error).then(console.log)
Full example
const aaron = require('aaron-api-client')
async function getPillages(){
await aaron.init({
email: "your-mail@aaronlem.ovh",
password: "password"
}).catch(console.error)
aaron.send({
url: "/pillage?color=blue",
method: "get"
}).then(console.log).catch(console.error)
}
getPillages();