Comparing version 1.17.0 to 1.18.0
{ | ||
"name": "wikiapi", | ||
"title": "JavaScript MediaWiki API for node.js", | ||
"version": "1.17.0", | ||
"version": "1.18.0", | ||
"description": "A simple way to access MediaWiki API via JavaScript with simple wikitext parser.", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -377,8 +377,9 @@ /** | ||
// skip_edit is not error | ||
if (error && error !== /* 'skip' */ Wikiapi.skip_edit[1] | ||
if (error | ||
// @see wiki_API_edit.check_data | ||
&& error !== 'empty' && error !== 'cancel') { | ||
if (typeof error === 'string') { | ||
&& error[0] !== Wikiapi.skip_edit[0]) { | ||
if (typeof error[1] === 'string') { | ||
// console.log('' + reject); | ||
// console.trace(error); | ||
error = error[1]; | ||
const error_object = new Error(error); | ||
@@ -437,3 +438,3 @@ error_object.from_string = error; | ||
summary: 'test edit', | ||
}); | ||
}); | ||
// </code> | ||
@@ -450,3 +451,3 @@ * | ||
+ '\nTest edit using {{GitHub|kanasimi/wikiapi}}.'; | ||
}, { bot: 1, nocreate: 1, minor: 1, summary: 'test edit' }); | ||
}, { bot: 1, nocreate: 1, minor: 1, redirect: 1, summary: 'test edit' }); | ||
// </code> | ||
@@ -467,3 +468,3 @@ * | ||
// console.trace(wiki); | ||
options = CeL.setup_options(options); | ||
options = { ...options, error_with_symbol: true }; | ||
// options.page_to_edit = title; | ||
@@ -533,3 +534,3 @@ // call wiki_API_prototype_method() @ CeL.application.net.wiki.list | ||
// <code> | ||
await wiki.move_page(move_from_title, move_to_title, { reason: reason, noredirect: true, movetalk: true }); | ||
await wiki.move_page(move_from_title, move_to_title, { reason, noredirect: true, movetalk: true }); | ||
// </code> | ||
@@ -1022,3 +1023,3 @@ * | ||
* | ||
* @example <caption>update wikidata</caption> | ||
* @example <caption>Checking if [[Category:Countries in North America]] including [[Mexico]].</caption> | ||
// <code> | ||
@@ -1031,2 +1032,8 @@ const enwiki = new Wikiapi('en'); | ||
* | ||
* @example <caption>Get all sub-categories of [[Category:Echinodermata]] with depth=2.</caption> | ||
// <code> | ||
const wiki = new Wikiapi('commons'); | ||
const all_sub_categories = (await wiki.category_tree('Echinodermata', { depth: 2, cmtype: 'subcat', get_flated_subcategories: true })).flated_subcategories; | ||
// </code> | ||
* | ||
* @memberof Wikiapi.prototype | ||
@@ -1053,3 +1060,3 @@ */ | ||
* | ||
* @example <caption>update wikidata</caption> | ||
* @example | ||
// <code> | ||
@@ -1056,0 +1063,0 @@ const KEY_subcategories = Wikiapi.KEY_subcategories; |
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
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
2466685
3481