This seems way to basic but there just aren't examples available and the documentation is bad in a very typical way. They don't say how to import the library.
I'm trying to use the MediaWiki officially supported library from a Typescript/React project.
There's some examples of basic usage but no import statement in the documentation.
I have tried:
import mw from 'mediawiki'
console.log(mw)
Which gives me an object that contains, very unexpectedly, this:
Object { version: "0.0.11", Bot: Bot(config) }
So I tried adding this, matching a little bit of what the docs look like:
const api = new mw.Bot()
Which produces an object that I just don't recognize as documented anywhere and does not work with the existing docs.
What is going on here? I just want a library that will let me get all the categories from a MediaWiki site and all the pages in a given category. Is it me or are these docs completely wrong and incomplete?
Or maybe I'm missing something really simple all Javascript developers just assume? I am a career software developer but I must admit I program in Javascript a lot less than I used to so there might be assumptions I'm missing here.
