Newly Paranoid Maintainers

    aaron-api-client

    1.0.2 • Public • Published

    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();

    Documentation

    Install

    npm i aaron-api-client

    DownloadsWeekly Downloads

    12

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    7.42 kB

    Total Files

    4

    Last publish

    Collaborators

    • bigchef