All Projects → dijs → Wiki

dijs / Wiki

Licence: mit
Wikipedia Interface for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Wiki

Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (-32.78%)
Mutual labels:  api, wrapper
Mailjet Apiv3 Nodejs
[API v3] Official Mailjet API v3 NodeJS wrapper
Stars: ✭ 137 (-23.89%)
Mutual labels:  api, wrapper
Dm env
A Python interface for reinforcement learning environments
Stars: ✭ 127 (-29.44%)
Mutual labels:  api, interface
Dawn Api Demo
dawn-api-demo
Stars: ✭ 117 (-35%)
Mutual labels:  api, wiki
Customstage
A JavaFX UI framework to create fully customized undecorated windows
Stars: ✭ 148 (-17.78%)
Mutual labels:  api, wiki
Ovoid
Un-Official OVO API Wrapper
Stars: ✭ 121 (-32.78%)
Mutual labels:  api, wrapper
Python Twitch Client
Python wrapper for Twitch API
Stars: ✭ 137 (-23.89%)
Mutual labels:  api, wrapper
Shellfuncs
Python API to execute shell functions as they would be Python functions
Stars: ✭ 96 (-46.67%)
Mutual labels:  api, interface
Coinbasepro Csharp
The unofficial .NET/C# client library for the Coinbase Pro/GDAX API
Stars: ✭ 143 (-20.56%)
Mutual labels:  api, wrapper
Wikit
Wikipedia summaries from the command line
Stars: ✭ 141 (-21.67%)
Mutual labels:  wikipedia, wiki
Tlaw
The Last API Wrapper: Pragmatic API wrapper framework
Stars: ✭ 112 (-37.78%)
Mutual labels:  api, wrapper
Spaces Api
An API wrapper for DigitalOcean's Spaces object storage designed for easy use.
Stars: ✭ 166 (-7.78%)
Mutual labels:  api, wrapper
Binance.api.csharp.client
C#.NET client for Binance Exchange API.
Stars: ✭ 98 (-45.56%)
Mutual labels:  api, wrapper
Kayn
superagent-inspired Node.js lib (w/ **some** TypeScript support) for accessing Riot's League of Legend's API (discord: cnguy#3614)
Stars: ✭ 122 (-32.22%)
Mutual labels:  api, wrapper
Apps Android Wikipedia
📱The official Wikipedia app for Android!
Stars: ✭ 1,350 (+650%)
Mutual labels:  wikipedia, wiki
Mastodonkit
MastodonKit is a Swift Framework that wraps Mastodon's API
Stars: ✭ 134 (-25.56%)
Mutual labels:  api, wrapper
Discord.jl
The Julia Discord API Wrapper
Stars: ✭ 93 (-48.33%)
Mutual labels:  api, wrapper
Linq To Wiki
.Net library to access MediaWiki API
Stars: ✭ 93 (-48.33%)
Mutual labels:  wikipedia, wiki
Git Wiki Theme
A revolutionary full-featured wiki for github pages and jekyll. You don't need to compile it!
Stars: ✭ 139 (-22.78%)
Mutual labels:  wikipedia, wiki
Wikipedia Mirror
🌐 Guide and tools to run a full offline mirror of Wikipedia.org with three different approaches: Nginx caching proxy, Kimix + ZIM dump, and MediaWiki/XOWA + XML dump
Stars: ✭ 160 (-11.11%)
Mutual labels:  wikipedia, wiki

NPM Version Build Status Coverage Status paypal

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 [email protected]:dijs/wiki.git
cd wiki
npm install
npm run build
npm test

Usage

import wiki from 'wikijs';
// const wiki = require('wikijs').default;

wiki()
	.page('Batman')
	.then(page => page.info('alterEgo'))
	.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"
}

Usage with other MediaWiki's

You can use the API options configuration:

wiki({
	apiUrl: 'https://awoiaf.westeros.org/api.php',
	origin: null
}).search('Winterfell');

Usage with other languages

You just need to change the API to the proper URL. This is normally just changing the subdomain of wikipedia.

wiki({ apiUrl: 'https://es.wikipedia.org/w/api.php' })
	.page('Cristiano Ronaldo')
	.then(page => page.info())
	.then(console.log);

Read more about Cross Domain Requests here

Usage with custom headers

If you need to pass authentication headers or anything else.

wiki({
	headers: {
		Cookie: 'name=value; name2=value2; name3=value3'
	}
}).search('Winterfell');

Parsing Wiki Infobox Data

The code Wikipedia uses for infobox data is strange and complex. So I have split the parsing code into another library. You can find it here. NPM Version

We not only parse out the information, but also try to transform the data into a convenient structure for data processing.

Contribute!

I always welcome help. Please just stick to the lint rules and write tests with each feature/fix.

Artwork

Thanks to Heather van der Dys for the awesome logo!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].