Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

ravener/wikia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wikia

A simple wrapper to interact with the Wikia API.

This package is outdated and used the /api/v1 rest api which is deprecated use the new MediaWiki api.php endpoint, there may be other wrappers for it.

Install

npm install wikia

Usage

const Wikia = require("wikia");

// for http://miraculousladybug.wikia.com
const wikia = new Wikia({ wiki: "miraculousladybug" });
// Leave wiki empty for cross-wiki actions however some methods requires a wiki

// All methods returns a Promise
// you can eiher use it with .then(callback)
// or use async/await
// for this example we will create an annonymous async function to use await.
(async() => {
  const articles = await wikia.getTopArticles();
  console.log(articles);

  console.log(await wikia.getWikiData());
})();

Useful Links

License

MIT

About

JavaScript API Wrapper for Wikia API

Resources

Stars

Watchers

Forks

Packages

No packages published