wiki.js-wrapper
TypeScript icon, indicating that this package has built-in type declarations

0.2.10 • Public • Published

wiki.js-wrapper

Tests NPM Version

A WIP wrapper for the Wiki.js API (GraphQL).

Documentation

Wiki.js-wrapper Documentation

Example

const {Client} = require("wiki.js-wrapper");
const options = {
    baseURL: "http://example.com/graphql",
    token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGkiOjEsImdycCI6MSwiaWF0IjoxNjQ5MjAzMjAwLCJleHAiOjE2ODA3MzkyMDAsImF1ZCI6InVybjp3aWtpLmpzIiwiaXNzIjoidXJuOndpa2kuanMiLCJ0eXBlIjoiZmFrZS1hc3MtdG9rZW4ifQ.FEWmrlsNrmbf9ESIgOhECNB_N9wRofUbM6UYLGpUrlw"
}
const client = new Client(options);

client.login().then((title)=>{
    console.log(`Connected to ${title}.`);
    client.pages.get(1).then(page => {
        console.log(page);
    }).catch(e => {
        console.log(e);
    });
}).catch(e => {
    console.log(e);
});

Readme

Keywords

Package Sidebar

Install

npm i wiki.js-wrapper

Weekly Downloads

1

Version

0.2.10

License

none

Unpacked Size

14.2 kB

Total Files

12

Last publish

Collaborators

  • tendrilll