LivingShadow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71713


Change subject: RepoApi.js: Add searchEntities()
......................................................................

RepoApi.js: Add searchEntities()

Change-Id: Id4cbe324abe6d31602a421ee55972584158e23e4
---
M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
1 file changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/13/71713/1

diff --git a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js 
b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
index 9946867..13873f4 100644
--- a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
+++ b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
@@ -136,6 +136,30 @@
                return this.get( params );
        },
 
+
+    /**
+     * Searches for entities containing the given text.
+     *
+     * @param {String} search search for this text
+     * @param {String} language search in this language
+     * @param {String} type search for this entity type
+     * @param {Number} limit maximum number of results to return
+     * @param {Number} offset offset where to continue the search
+     * @returns {jQuery.Promise}
+     */
+    searchEntities: function( search, language, type, limit, offset ) {
+        var params = {
+            action : 'wbsearchentities',
+            search : search,
+            language : language,
+            type : type,
+            limit : limit,
+            'continue' : offset
+        };
+
+        return this.get( params );
+    },
+
        /**
         * Sets the label of an entity via the API.
         *

-- 
To view, visit https://gerrit.wikimedia.org/r/71713
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4cbe324abe6d31602a421ee55972584158e23e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: LivingShadow <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to