Comparing version 1.19.4 to 1.19.5
@@ -445,3 +445,3 @@ 'use strict'; | ||
add_test('get list of categorymembers using for_each', async (assert, setup_test, finish_test) => { | ||
add_test('get list of categorymembers using for_each_page_in_list', async (assert, setup_test, finish_test) => { | ||
setup_test('get list of [[w:en:Category:Wikimedia Cloud Services]] using for_each'); | ||
@@ -451,3 +451,3 @@ | ||
let has_category_count = 0; | ||
const page_list_proto = await wiki.for_each('categorymembers', 'Wikimedia Cloud Services', async (category) => { | ||
const page_list_proto = await wiki.for_each_page_in_list('categorymembers', 'Wikimedia Cloud Services', async (category) => { | ||
const page_data = await wiki.page(category); | ||
@@ -454,0 +454,0 @@ const parsed = page_data.parse(); |
{ | ||
"name": "wikiapi", | ||
"title": "JavaScript MediaWiki API for node.js", | ||
"version": "1.19.4", | ||
"version": "1.19.5", | ||
"description": "A simple way to access MediaWiki API via JavaScript with simple wikitext parser.", | ||
@@ -32,2 +32,4 @@ "keywords": [ | ||
}, | ||
"type": "commonjs", | ||
"main": "Wikiapi.js", | ||
@@ -34,0 +36,0 @@ "scripts": { |
@@ -12,2 +12,5 @@ [![npm version](https://badge.fury.io/js/wikiapi.svg)](https://www.npmjs.com/package/wikiapi) | ||
# JavaScript MediaWiki API | ||
<p align="center"> | ||
<img alt="Wikiapi logo" width="244" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/WikiapiJS_MW_gear_icon.svg/244px-WikiapiJS_MW_gear_icon.svg.png" /> | ||
</p> | ||
A simple way to access MediaWiki API via JavaScript with [wikitext parser](https://kanasimi.github.io/CeJS/_test%20suite/wikitext_parser.html). | ||
@@ -265,2 +268,8 @@ This is basically a modern syntax version of [CeJS MediaWiki module](https://github.com/kanasimi/CeJS/blob/master/application/net/wiki). For example, using [async functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). | ||
### User agent | ||
By default, the library will use the user agent `get_URL_node.default_user_agent` set in [Ajax.js](https://github.com/kanasimi/CeJS/blob/master/application/net/Ajax.js). If you want to [set another user agent](https://meta.wikimedia.org/wiki/User-Agent_policy), you can change `CeL.wiki.query.get_URL_options` listed in [query.js](https://github.com/kanasimi/CeJS/blob/master/application/net/wiki/query.js): | ||
```javascript | ||
CeL.wiki.query.get_URL_options.headers['User-Agent'] = 'testbot/1.0'; | ||
``` | ||
## OS support | ||
@@ -267,0 +276,0 @@ | Platform | support | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2499163
60
3669
287