Wikipedia Interface for Node.js
JavaScript
Latest commit fd473e4 Nov 15, 2016 @dijs 1.1.1

README.md

NPM Version Build Status Coverage Status gitcheese.com

WikiJs

WikiJs is a node.js library which serves as an interface to Wikipedia (or any MediaWiki).

What can it do?

  • Search wiki articles
  • Fetch article content
  • Find all links/images/categories in a article page
  • Get parsed information about articles
  • Find articles by geographical location
  • and much more!

Documentation

https://dijs.github.io/wiki

Install

npm install wikijs

Build yourself

You can run these commands in order to build and test WikiJs:

git clone git@github.com:dijs/wiki.git
cd wiki
npm install
npm run build
npm test

Usage

import wiki from 'wikijs';

wiki().page('Batman')
    .then(page => page.info('alter_ego'))
    .then(console.log); // Bruce Wayne

Usage with webpack

In order for webpack to build wikijs properly, you must add an option to your webpack configuration file. Documentation

externals: {
  "isomorphic-fetch": "fetch"
}