Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wikiapi

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wikiapi - npm Package Compare versions

Comparing version 1.19.2 to 1.19.3

2

package.json
{
"name": "wikiapi",
"title": "JavaScript MediaWiki API for node.js",
"version": "1.19.2",
"version": "1.19.3",
"description": "A simple way to access MediaWiki API via JavaScript with simple wikitext parser.",

@@ -6,0 +6,0 @@ "keywords": [

@@ -129,2 +129,5 @@ /**

user_name: '', password: '', API_URL: 'en',
// Ror lingualibre only. @see https://github.com/kanasimi/wikibot/blob/master/wiki%20configuration.sample.js
//data_API_URL: 'https://lingualibre.org/api.php',
//SPARQL_API_URL: 'https://lingualibre.org/bigdata/namespace/wdq/sparql',
// Calling in another domain

@@ -326,2 +329,3 @@ origin: '*'

}, {
// node.js v12.22.7: Cannot use "?."
rvlimit: options && options.revisions,

@@ -597,4 +601,5 @@ ...options

if (!wiki.last_page) {
reject(new Error('Wikiapi_move_to: Must call .page() first!'
+ ' Can not move to ' + wiki_API.title_link_of(move_to_title)));
reject(new Error(Wikiapi_move_to.name + ': Must call .page() first! '
// gettext_config:{"id":"cannot-move-to-$1"}
+ CeL.gettext('Cannot move to %1', wiki_API.title_link_of(move_to_title))));
return;

@@ -934,2 +939,21 @@ }

*
* @example <caption>Get specific DOI</caption>
// <code>
// for case-insensitive DOI
const wikidata_item_list = await wiki.search('haswbstatement:' + JSON.stringify('P356=10.1371/journal.pone.0029797'), { namespace: 0 });
//wikidata_item_list.map(item => item.title)
// for case-sensitive DOI
const wikidata_item_list = await wiki.SPARQL(`
SELECT ?doi ?item ?itemLabel WHERE {
VALUES ?doi { "10.1371/JOURNAL.PONE.0029797" }
?item wdt:P356 ?doi.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}`, {
// options.API_URL: custom SPARQL endpoint
API_URL: ''
});
//wikidata_item_list.id_list()
// </code>
*
* @memberof Wikiapi.prototype

@@ -945,3 +969,3 @@ */

}
}, options);
}, this.append_session_to_options(options));
}

@@ -1143,3 +1167,3 @@

*
* @example <caption></caption>
* @example <caption>Get redirects target of [[WP:SB]]</caption>
// <code>

@@ -1181,3 +1205,3 @@ const redirects_taregt = await enwiki.redirects_root('WP:SB', { get_page_data: true });

*
* @example <caption></caption>
* @example <caption>Get all pages redirects to [[Wikipedia:Sandbox]]</caption>
// <code>

@@ -1699,3 +1723,3 @@ const redirects_list = await enwiki.redirects_here('Wikipedia:Sandbox');

const wiki = this[KEY_wiki_session];
wiki.get_featured_content(options, (FC_data_hash) => {
wiki.get_featured_content(options, FC_data_hash => {
try {

@@ -1867,3 +1891,3 @@ this.FC_data_hash = FC_data_hash;

for (const type of wiki_API.list.type_list) {
// Can not use `= (title, options) {}` !
// Cannot use `= (title, options) {}` !
// arrow function expression DO NOT has this, arguments, super, or

@@ -1870,0 +1894,0 @@ // new.target keywords.

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 not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc