Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

API:Client code

From mediawiki.org
Translate this page
Languages:
This page is part of theMediaWiki Action API documentation.
MediaWiki Action API
Basics
Authentication
Accounts and Users
Page Operations
Search
Developer Utilities
Tutorials
v·d·e

Client libraries contain code that developers can use to help with common and basic tasks, so that they don't have to write the code from scratch when their projects interact with an API.

This page contains a set of lists, by language, of several recommended client libraries that can be used with the MediaWiki Action API.The recommendations are based on evaluations usingAPI:Client code/Gold standard.

New and/or unevaluated libraries can be added toAPI:Client_code/All.

API client libraries

Last activity refers to the last commit in the repository.
Dates and version numbers were updated on 2019-06-19.

Awk

NameDescriptionLast releaseRelease dateLast activity
BotWikiAwkFramework and libraries for creating bots. Includes example bots.
WikigetAwk CLI program to interface with MediaWiki API for read/write including OAuth.

Bash

NameDescriptionLast releaseRelease dateLast activity
bash-mediawikiAn example with Curl that allows easy editing/uploading of a wiki through the MediaWiki API.

C++

NameDescriptionLast releaseRelease dateLast activity
libmediawikiA library that allows easy editing of a wiki through the MediaWiki API.

Common Lisp

NameDescriptionLast releaseRelease dateLast activity
cl-mediawikiA Common Lisp wrapper for the MediaWiki API.

Elixir

NameDescriptionLast releaseRelease DateLast activity
mediawiki_client_exAdapter for the Action API, EventStreams, and ORES. (Documentation)0.4.1

Go

NameDescriptionLast releaseRelease dateLast activity
go-mediawikiGo wrapper for the MediaWiki API.v0.1
go-mwclientWrapper for the MediaWiki API (supports maxlag, query continuations, OAuth).v1.2.0

Haskell

NameDescriptionLast releaseRelease dateLast activity
haskell mediawikiA complete Haskell binding to the MediaWiki API letting you programmatically access (read and write) MediaWiki content.0.2.6

Java

NameDescriptionLast releaseRelease dateLast activity
JavaWikiBotFrameworkA library to retrieve data from and maintain MediaWiki-based wikis such as Wikipedia.4.0.0
jwikiA library for effortlessly interacting with Wikipedia/MediaWiki.1.8.0
Bliki EngineCan convert wikicode to HTML, DocBook or PDF. Has ahelper library for API calls.

More Java libraries available atAPI:Client_code/All#Java.

JavaScript

NameDescriptionLast releaseRelease dateLast activity
mwn (Node.js)Mwn is a modern and feature-rich API client with support for both JavaScript and TypeScript. Has classes for conveniently working with page titles and parsing wikitext. Supports both OAuth and BotPasswords.v3.0.1
mwbot-ts (Node.js)mwbot-ts is a TypeScript-compatible library featuring a flexible core class and an offline wikitext parser that handles even edge-case wiki markup. With the core class designed to be subclassed, it's suitable for implementing application-specific logic and methods. Supports both OAuth and BotPasswords.v1.2.1
mwbot (Node.js)MWBot uses the Promise pattern and other ES6 methodologies, optimised for creating bots that make edits. Works with any MediaWiki site.v2.1.3
nodemw (Node.js)A generic MediaWiki API client for Node.js.v0.24.1
wikiapi (Node.js)A simple way to access MediaWiki API via JavaScript with simple wikitext parser.v1.20.0
mediawiki.api (browser)Generic MediaWiki API client for client-side JavaScript. It ships with MediaWiki core as a ResourceLoader module bundle. It abstracts some high-level concepts and provides a generic client for other queries.Maintained as part of MediaWiki.

In-wiki JavaScript clients:

NameDescriptionLast releaseRelease dateLast activity
mwapilib2A layer overtop of the requests. Make JS gadgets easier.
JsMwApiA convenience wrapper around raw requests, with some helpers for editing and parsing.

More JavaScript libraries available atAPI:Client_code/All#JavaScript.

Lua

NameDescriptionLast releaseRelease dateLast activity
dtMediaWikiMakes query (tokens, userinfo), clientlogin, upload, and logout calls. It handles HTTPS requests and cookies and can be used to upload files to Wikimedia Commons.

MATLAB

NameDescriptionLast releaseRelease dateLast activity
MatWikiA preliminary (as of Feb 2019) MATLAB R2016b(9.1.x) client supporting just bot-logins & semantic #ask queries.v1.0.0

.NET

NameDescriptionLast releaseRelease dateLast activity
WikiFunctionsLibrary with classes for editing and getting lists of pages via the API, used byAutoWikiBrowser.6.2.1.0
LinqToWikiStrongly typed library for accessing most of MediaWiki API, with support for autocompletion.1.5.0
WikiClientLibraryA .NET Standard & asynchronous MediaWiki API client library for wiki sites. The library also supports Flow/Wikibase/Wikia-specific API.v0.7.5

More .NET libraries available atAPI:Client code/All#.NET.

OCaml

NameDescriptionLast releaseRelease dateLast activity
ocaml-mediawikiA high-level binding for the MediaWiki API written in OCaml.

Perl

NameDescriptionLast releaseRelease dateLast activity
MediaWiki::BotA higher-level Perl module with read and write functions. Easily extensible with plugins, for exampleto provide administrator functions (Evaluation).

source code on GitHub.

5.006003
MediaWiki::APIA Perl module for interfacing with the MediaWiki API with file upload/download and editing support. (Debian package). (Evaluation).0.41

PHP

NameDescriptionLast releaseRelease dateLast activity
mediawiki-api-baseLibrary for basicMediaWiki api use.2.4.0
mediawiki-apiA simple library for interacting with the MediaWiki API.0.7.2
wikibase-apiLibrary for queryingWikidata.0.7

More PHP libraries available atAPI:Client code/All#PHP.

Sometimes people try to use these kind of libraries to access a MediaWiki installation on the same server. This is often unnecessary because MediaWiki itself is written in PHP, especially when the only purpose of the script is interacting with MediaWiki. WithrequireWebStart.php (MW_INSTALL_PATH may need to be set beforehand, seeManual:$IP), a script gets access toMediaWiki components and consequently it cancall the API internally or use other MediaWiki classes and functions directly, which greatly reduces server load.

Python

NameType hintsDescriptionLast releaseRelease dateLast activity
PywikibotdocsYesA collection of Python scripts and a powerful library for bot writing. (PyPI) (Git repository) (#pywikibotconnect) (Evaluation).10.2.0
pwikidocsYesA Python library for developing bots/tools, focused on ease of use and simplicity.1.1.1
mwclientdocsNoPython library that makes most of the API functions accessible. (PyPI) (Evaluation).0.10.1
wiki-scriptsdocsNoFramework for writing bots, maintenance scripts or performing data analysis.1.2

Simple Python wrappers for no-abstraction interfaces to the MediaWiki API and basic session handling:

NameType hintsDescriptionLast releaseRelease dateLast activity
pywikiapiNoA minimalistic library that handles some of the core MediaWiki API complexities like handling continuations, login, errors, and warnings, but does not impose any additional abstraction layers.1.3.2
WikipediadocsNoA Python library that makes it easy to access and parse data from Wikipedia.v1.1
wikitoolsNoProvides several layers of abstraction around the API. Doesn't support Python 3.0.41

More Python libraries available atAPI:Client code/All#Python.

R

NameDescriptionLast releaseRelease dateLast activity
WikipediRA wrapper for the MediaWiki API, aimed particularly at the Wikimedia 'production' wikis, such as Wikipedia. Can be used to retrieve page text, information about users or the history of pages, and elements of the category tree.1.5.0

Ruby

NameDescriptionLast releaseRelease dateLast activity
MediaWiki::ButtStable and powerful Ruby framework for the API. (Evaluation)3.0.0
wikipedia-clientRuby framework using the API.v1.10.0
MediaWiki Ruby APIRuby API client library in active development byWikimedia Foundation Release Engineering.0.71

More Ruby libraries available atAPI:Client code/All#Ruby.

Rust

NameDescriptionLast releaseRelease dateLast activity
Wikibase RSRust library to talk to the Wikibase API and serialize data into Rust data structures.0.37
mediawiki_rustA MediaWiki client library in Rust.
mwbot-rsA framework for writing bots on MediaWiki0.4.3
wikiLibrary for interacting with MediaWiki APIs0.0.3

More Rust libraries available atAPI:Client code/All#Rust.

Scala

NameDescriptionLast releaseRelease dateLast activity
scalawikiMediaWiki client in Scala.0.6.3
dbpedia extraction frameworkData extraction framework for DBpedia with support Wiki source retrieved via MediaWiki API.DBpedia_2015-10
scmwSimple MediaWiki API wrapper for needs ofCommonist image upload tool.v-0.140.0

See also

Retrieved from "https://www.mediawiki.org/w/index.php?title=API:Client_code&oldid=7689014"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp