Skip to content

TenDRILLL/wiki.js-wrapper

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published