├── .gitignore ├── Gruntfile.js ├── LICENSE ├── README.md ├── bower.json ├── demo ├── index.html └── js │ └── app.js ├── dist ├── angular-wikipedia-api-factory.js └── angular-wikipedia-api-factory.min.js ├── package.json └── src └── angular-wikipedia-api-factory.js /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /config.codekit 3 | /bower_components 4 | /.idea/ 5 | /.codekit-cache/ -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | var banner = '/**\n @name: <%= pkg.name %> \n @version: <%= pkg.version %> (<%= grunt.template.today("dd-mm-yyyy") %>) \n @author: <%= pkg.author %> \n @url: <%= pkg.homepage %> \n @license: <%= pkg.license %>\n*/\n'; 4 | 5 | grunt.initConfig({ 6 | pkg: grunt.file.readJSON('package.json'), 7 | uglify: { 8 | js: { 9 | files : { 10 | 'dist/angular-wikipedia-api-factory.min.js' : ['src/*.js'] 11 | } 12 | }, 13 | options: { 14 | banner: banner, 15 | } 16 | }, 17 | concat: { 18 | options: { 19 | separator: ';', 20 | banner: banner, 21 | }, 22 | dist: { 23 | files : { 24 | 'dist/angular-wikipedia-api-factory.js' : ['src/*.js'] 25 | } 26 | }, 27 | }, 28 | watch: { 29 | minifiyJs: { 30 | files: [ 31 | 'src/*.js' 32 | ], 33 | tasks: ['uglify', 'concat'], 34 | options: { 35 | spawn: true, 36 | }, 37 | }, 38 | }, 39 | }); 40 | 41 | grunt.loadNpmTasks('grunt-contrib-uglify'); 42 | grunt.loadNpmTasks('grunt-contrib-watch'); 43 | grunt.loadNpmTasks('grunt-contrib-concat'); 44 | 45 | grunt.registerTask('default', ['watch']); 46 | 47 | }; 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Jonathan Hornung 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **angular-wikipedia-api-factory** is an angularjs module with a wikipedia api factory. 2 | 3 | [![npm version](https://badge.fury.io/js/angular-wikipedia-api-factory.svg)](https://badge.fury.io/js/angular-wikipedia-api-factory) 4 | [![Bower version](https://badge.fury.io/bo/angular-wikipedia-api-factory.svg)](https://badge.fury.io/bo/angular-wikipedia-api-factory) 5 | 6 | Author: Jonathan Hornung ([JohnnyTheTank](https://github.com/JohnnyTheTank)) 7 | 8 | ## Usage 9 | 10 | 1. Install via either [bower](http://bower.io/), [npm](https://www.npmjs.com/) or downloaded files: 11 | 1. `bower install --save angular-wikipedia-api-factory` 12 | 2. `npm install --save angular-wikipedia-api-factory` 13 | 3. download [angular-wikipedia-api-factory.zip](https://github.com/JohnnyTheTank/angular-wikipedia-api-factory/zipball/master) 14 | 2. Include dependencies in your HTML. 15 | 1. When using bower: 16 | ```html 17 | 18 | ``` 19 | 2. When using npm: 20 | ```html 21 | 22 | ``` 23 | 3. when using downloaded files 24 | ```html 25 | 26 | ``` 27 | 3. Add **`jtt_wikipedia`** to your application's module dependencies 28 | 29 | ```JavaScript 30 | angular.module('app', ['jtt_wikipedia']); 31 | ``` 32 | 4. Use the factory `wikipediaFactory` 33 | 34 | ```JavaScript 35 | angular.module('app') 36 | .controller('appController', function($scope, wikipediaFactory){ 37 | 38 | wikipediaFactory.getArticle({ 39 | term: 'Oktoberfest' 40 | }).then(function (_data) { 41 | //on success 42 | }); 43 | 44 | }); 45 | ``` 46 | 47 | ### factory methods 48 | 49 | #### searchArticles 50 | 51 | ```js 52 | wikipediaFactory.searchArticles({ 53 | term: '', // Searchterm 54 | lang: '', // (optional) default: 'en' 55 | gsrlimit: '', // (optional) default: 10. valid values: 0-500 56 | pithumbsize: '', // (optional) default: 400 57 | pilimit: '', // (optional) 'max': images for all articles, otherwise only for the first 58 | exlimit: '', // (optional) 'max': extracts for all articles, otherwise only for the first 59 | exintro: '', // (optional) '1': if we just want the intro, otherwise it shows all sections 60 | }).then(function (_data) { 61 | //on success 62 | }).catch(function (_data) { 63 | //on error 64 | }); 65 | ``` 66 | 67 | 68 | ```js 69 | wikipediaFactory.searchArticlesByTitle({ 70 | term: '', // Searchterm 71 | lang: '', // (optional) default: 'en' 72 | gsrlimit: '', // (optional) default: 10. valid values: 0-500 73 | pithumbsize: '', // (optional) default: 400 74 | pilimit: '', // (optional) 'max': images for all articles, otherwise only for the first 75 | exlimit: '', // (optional) 'max': extracts for all articles, otherwise only for the first 76 | exintro: '', // (optional) '1': if we just want the intro, otherwise it shows all sections 77 | }).then(function (_data) { 78 | //on success 79 | }).catch(function (_data) { 80 | //on error 81 | }); 82 | ``` 83 | 84 | #### getArticle 85 | 86 | ```js 87 | wikipediaFactory.getArticle({ 88 | term: '', // Searchterm 89 | lang: '', // (optional) default: 'en' 90 | pithumbsize: '', // (optional) default: '400' 91 | }).then(function (_data) { 92 | //on success 93 | }).catch(function (_data) { 94 | //on error 95 | }); 96 | ``` 97 | 98 | ## Wikipedia JSONP API 99 | 100 | * Documentation: https://www.mediawiki.org/wiki/API:Main_page/en 101 | * API Sandbox: https://www.mediawiki.org/wiki/Special:ApiSandbox 102 | 103 | ## More angular-api-factories 104 | [bandsintown](https://github.com/JohnnyTheTank/angular-bandsintown-api-factory) - [dailymotion](https://github.com/JohnnyTheTank/angular-dailymotion-api-factory) - [facebook](https://github.com/JohnnyTheTank/angular-facebook-api-factory) - [flickr](https://github.com/JohnnyTheTank/angular-flickr-api-factory) - [footballdata](https://github.com/JohnnyTheTank/angular-footballdata-api-factory) - [github](https://github.com/JohnnyTheTank/angular-github-api-factory) - [openweathermap](https://github.com/JohnnyTheTank/angular-openweathermap-api-factory) - [tumblr](https://github.com/JohnnyTheTank/angular-tumblr-api-factory) - [vimeo](https://github.com/JohnnyTheTank/angular-vimeo-api-factory) - **wikipedia** - [youtube](https://github.com/JohnnyTheTank/angular-youtube-api-factory) 105 | 106 | 107 | 108 | ## License 109 | 110 | MIT -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-wikipedia-api-factory", 3 | "homepage": "https://github.com/JohnnyTheTank/angular-wikipedia-api-factory", 4 | "authors": [ 5 | "Jonathan Hornung " 6 | ], 7 | "version": "0.2.4", 8 | "description": "angular factory for wikipedia rest api connection", 9 | "main": "dist/angular-wikipedia-api-factory.min.js", 10 | "moduleType": [], 11 | "keywords": [ 12 | "wikipedia", 13 | "angularjs", 14 | "rest", 15 | "api", 16 | "json" 17 | ], 18 | "license": "MIT", 19 | "ignore": [ 20 | "**/.*", 21 | "node_modules", 22 | "bower_components", 23 | "test", 24 | "tests" 25 | ], 26 | "dependencies": { 27 | "angular": "*" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | angular-wikipedia-api-factory 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | Look in your console 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /demo/js/app.js: -------------------------------------------------------------------------------- 1 | var app = angular.module("app", ['jtt_wikipedia']); 2 | app.controller('controller', ['$scope', 'wikipediaFactory', function($scope, wikipediaFactory) { 3 | 4 | wikipediaFactory.searchArticlesByTitle({ 5 | term:"Jonathan", 6 | gsrlimit: 3 7 | }).then(function(_data){ 8 | console.info("search articles by title", _data); 9 | }); 10 | 11 | wikipediaFactory.searchArticles({ 12 | term:"soccer", 13 | gsrlimit: 20 14 | }).then(function(_data){ 15 | console.info("search articles", _data); 16 | }); 17 | 18 | wikipediaFactory.getArticle({ 19 | term:"United States Soccer Federation", 20 | }).then(function(_data){ 21 | console.info("get article", _data); 22 | }); 23 | 24 | }]); 25 | -------------------------------------------------------------------------------- /dist/angular-wikipedia-api-factory.js: -------------------------------------------------------------------------------- 1 | /** 2 | @name: angular-wikipedia-api-factory 3 | @version: 0.2.4 (12-03-2017) 4 | @author: Jonathan Hornung 5 | @url: https://github.com/JohnnyTheTank/angular-wikipedia-api-factory#readme 6 | @license: MIT 7 | */ 8 | "use strict"; 9 | 10 | angular.module("jtt_wikipedia", []) 11 | .factory('wikipediaFactory', ['$http', 'wikipediaSearchDataService', function ($http, wikipediaSearchDataService) { 12 | 13 | var wikipediaFactory = {}; 14 | 15 | wikipediaFactory.searchArticlesByTitle = function (_params) { 16 | 17 | var wikipediaSearchData = wikipediaSearchDataService.getNew("searchArticlesByTitle", _params); 18 | 19 | return $http.jsonp( 20 | wikipediaSearchData.url, 21 | { 22 | method: 'GET', 23 | params: wikipediaSearchData.object, 24 | } 25 | ); 26 | }; 27 | 28 | wikipediaFactory.searchArticles = function (_params) { 29 | 30 | var wikipediaSearchData = wikipediaSearchDataService.getNew("searchArticles", _params); 31 | 32 | return $http.jsonp( 33 | wikipediaSearchData.url, 34 | { 35 | method: 'GET', 36 | params: wikipediaSearchData.object, 37 | } 38 | ); 39 | }; 40 | 41 | wikipediaFactory.getArticle = function (_params) { 42 | 43 | var wikipediaSearchData = wikipediaSearchDataService.getNew("getArticle", _params); 44 | 45 | return $http.jsonp( 46 | wikipediaSearchData.url, 47 | { 48 | method: 'GET', 49 | params: wikipediaSearchData.object, 50 | } 51 | ); 52 | }; 53 | 54 | return wikipediaFactory; 55 | }]) 56 | .service('wikipediaSearchDataService', function () { 57 | this.getApiBaseUrl = function (_lang) { 58 | return 'https://' + _lang + ".wikipedia.org/w/api.php"; 59 | }; 60 | 61 | this.fillDataInObjectByList = function (_object, _params, _list) { 62 | 63 | angular.forEach(_list, function (value, key) { 64 | if (angular.isDefined(_params[value])) { 65 | _object.object[value] = _params[value]; 66 | } 67 | }); 68 | 69 | return _object; 70 | }; 71 | 72 | this.getNew = function (_type, _params) { 73 | 74 | var wikipediaSearchData = { 75 | object: { 76 | callback: "JSON_CALLBACK", 77 | action: 'query', 78 | format: 'json', 79 | formatversion: 2, 80 | }, 81 | url: "", 82 | }; 83 | 84 | if (angular.isUndefined(_params.lang)) { 85 | _params.lang = 'en' 86 | } 87 | 88 | if (angular.isUndefined(_params.pithumbsize)) { 89 | _params.pithumbsize = '400' 90 | } 91 | 92 | switch (_type) { 93 | case "searchArticlesByTitle": 94 | wikipediaSearchData.object.prop = 'extracts|pageimages|info'; 95 | wikipediaSearchData.object.generator = 'search'; 96 | wikipediaSearchData.object.gsrsearch = 'intitle:' + _params.term; 97 | wikipediaSearchData.object.pilimit = 'max'; 98 | wikipediaSearchData.object.exlimit = 'max'; 99 | wikipediaSearchData.object.exintro = ''; 100 | 101 | wikipediaSearchData = this.fillDataInObjectByList(wikipediaSearchData, _params, [ 102 | 'prop', 'generator', 'gsrsearch', 'pilimit', 'exlimit', 'exintro', 'rvparse', 'formatversion', 'prop', 'pithumbsize', 'gsrlimit' 103 | ]); 104 | wikipediaSearchData.url = this.getApiBaseUrl(_params.lang); 105 | break; 106 | 107 | case "searchArticles": 108 | wikipediaSearchData.object.prop = 'extracts|pageimages|info'; 109 | wikipediaSearchData.object.generator = 'search'; 110 | wikipediaSearchData.object.gsrsearch = _params.term; 111 | wikipediaSearchData.object.pilimit = 'max'; 112 | wikipediaSearchData.object.exlimit = 'max'; 113 | wikipediaSearchData.object.exintro = ''; 114 | 115 | wikipediaSearchData = this.fillDataInObjectByList(wikipediaSearchData, _params, [ 116 | 'prop', 'generator', 'gsrsearch', 'pilimit', 'exlimit', 'exintro', 'rvparse', 'formatversion', 'prop', 'pithumbsize', 'gsrlimit' 117 | ]); 118 | wikipediaSearchData.url = this.getApiBaseUrl(_params.lang); 119 | break; 120 | 121 | case "getArticle": 122 | wikipediaSearchData.object.prop = 'extracts|pageimages|images|info'; 123 | wikipediaSearchData.object.titles = _params.term; 124 | 125 | wikipediaSearchData = this.fillDataInObjectByList(wikipediaSearchData, _params, [ 126 | 'prop', 'rvparse', 'formatversion', 'prop', 'pithumbsize', 'redirects' 127 | ]); 128 | wikipediaSearchData.url = this.getApiBaseUrl(_params.lang); 129 | break; 130 | } 131 | return wikipediaSearchData; 132 | }; 133 | }); -------------------------------------------------------------------------------- /dist/angular-wikipedia-api-factory.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | @name: angular-wikipedia-api-factory 3 | @version: 0.2.4 (12-03-2017) 4 | @author: Jonathan Hornung 5 | @url: https://github.com/JohnnyTheTank/angular-wikipedia-api-factory#readme 6 | @license: MIT 7 | */ 8 | "use strict";angular.module("jtt_wikipedia",[]).factory("wikipediaFactory",["$http","wikipediaSearchDataService",function(a,b){var c={};return c.searchArticlesByTitle=function(c){var d=b.getNew("searchArticlesByTitle",c);return a.jsonp(d.url,{method:"GET",params:d.object})},c.searchArticles=function(c){var d=b.getNew("searchArticles",c);return a.jsonp(d.url,{method:"GET",params:d.object})},c.getArticle=function(c){var d=b.getNew("getArticle",c);return a.jsonp(d.url,{method:"GET",params:d.object})},c}]).service("wikipediaSearchDataService",function(){this.getApiBaseUrl=function(a){return"https://"+a+".wikipedia.org/w/api.php"},this.fillDataInObjectByList=function(a,b,c){return angular.forEach(c,function(c,d){angular.isDefined(b[c])&&(a.object[c]=b[c])}),a},this.getNew=function(a,b){var c={object:{callback:"JSON_CALLBACK",action:"query",format:"json",formatversion:2},url:""};switch(angular.isUndefined(b.lang)&&(b.lang="en"),angular.isUndefined(b.pithumbsize)&&(b.pithumbsize="400"),a){case"searchArticlesByTitle":c.object.prop="extracts|pageimages|info",c.object.generator="search",c.object.gsrsearch="intitle:"+b.term,c.object.pilimit="max",c.object.exlimit="max",c.object.exintro="",c=this.fillDataInObjectByList(c,b,["prop","generator","gsrsearch","pilimit","exlimit","exintro","rvparse","formatversion","prop","pithumbsize","gsrlimit"]),c.url=this.getApiBaseUrl(b.lang);break;case"searchArticles":c.object.prop="extracts|pageimages|info",c.object.generator="search",c.object.gsrsearch=b.term,c.object.pilimit="max",c.object.exlimit="max",c.object.exintro="",c=this.fillDataInObjectByList(c,b,["prop","generator","gsrsearch","pilimit","exlimit","exintro","rvparse","formatversion","prop","pithumbsize","gsrlimit"]),c.url=this.getApiBaseUrl(b.lang);break;case"getArticle":c.object.prop="extracts|pageimages|images|info",c.object.titles=b.term,c=this.fillDataInObjectByList(c,b,["prop","rvparse","formatversion","prop","pithumbsize","redirects"]),c.url=this.getApiBaseUrl(b.lang)}return c}}); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-wikipedia-api-factory", 3 | "version": "0.2.4", 4 | "description": "angularjs factory for wikipedia jsonp rest api requests", 5 | "main": "dist/angular-wikipedia-api-factory.min.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/JohnnyTheTank/angular-wikipedia-api-factory.git" 12 | }, 13 | "keywords": [ 14 | "angularjs", 15 | "angular", 16 | "wikipedia", 17 | "api", 18 | "factory" 19 | ], 20 | "author": "Jonathan Hornung", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/JohnnyTheTank/angular-wikipedia-api-factory/issues" 24 | }, 25 | "homepage": "https://github.com/JohnnyTheTank/angular-wikipedia-api-factory#readme", 26 | "devDependencies": { 27 | "grunt": "^0.4.5", 28 | "grunt-contrib-concat": "^0.5.1", 29 | "grunt-contrib-uglify": "^0.11.0", 30 | "grunt-contrib-watch": "^0.6.1" 31 | }, 32 | "dependencies": { 33 | "angular": "*" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/angular-wikipedia-api-factory.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | angular.module("jtt_wikipedia", []) 4 | .factory('wikipediaFactory', ['$http', 'wikipediaSearchDataService', function ($http, wikipediaSearchDataService) { 5 | 6 | var wikipediaFactory = {}; 7 | 8 | wikipediaFactory.searchArticlesByTitle = function (_params) { 9 | 10 | var wikipediaSearchData = wikipediaSearchDataService.getNew("searchArticlesByTitle", _params); 11 | 12 | return $http.jsonp( 13 | wikipediaSearchData.url, 14 | { 15 | method: 'GET', 16 | params: wikipediaSearchData.object, 17 | } 18 | ); 19 | }; 20 | 21 | wikipediaFactory.searchArticles = function (_params) { 22 | 23 | var wikipediaSearchData = wikipediaSearchDataService.getNew("searchArticles", _params); 24 | 25 | return $http.jsonp( 26 | wikipediaSearchData.url, 27 | { 28 | method: 'GET', 29 | params: wikipediaSearchData.object, 30 | } 31 | ); 32 | }; 33 | 34 | wikipediaFactory.getArticle = function (_params) { 35 | 36 | var wikipediaSearchData = wikipediaSearchDataService.getNew("getArticle", _params); 37 | 38 | return $http.jsonp( 39 | wikipediaSearchData.url, 40 | { 41 | method: 'GET', 42 | params: wikipediaSearchData.object, 43 | } 44 | ); 45 | }; 46 | 47 | return wikipediaFactory; 48 | }]) 49 | .service('wikipediaSearchDataService', function () { 50 | this.getApiBaseUrl = function (_lang) { 51 | return 'https://' + _lang + ".wikipedia.org/w/api.php"; 52 | }; 53 | 54 | this.fillDataInObjectByList = function (_object, _params, _list) { 55 | 56 | angular.forEach(_list, function (value, key) { 57 | if (angular.isDefined(_params[value])) { 58 | _object.object[value] = _params[value]; 59 | } 60 | }); 61 | 62 | return _object; 63 | }; 64 | 65 | this.getNew = function (_type, _params) { 66 | 67 | var wikipediaSearchData = { 68 | object: { 69 | callback: "JSON_CALLBACK", 70 | action: 'query', 71 | format: 'json', 72 | formatversion: 2, 73 | }, 74 | url: "", 75 | }; 76 | 77 | if (angular.isUndefined(_params.lang)) { 78 | _params.lang = 'en' 79 | } 80 | 81 | if (angular.isUndefined(_params.pithumbsize)) { 82 | _params.pithumbsize = '400' 83 | } 84 | 85 | switch (_type) { 86 | case "searchArticlesByTitle": 87 | wikipediaSearchData.object.prop = 'extracts|pageimages|info'; 88 | wikipediaSearchData.object.generator = 'search'; 89 | wikipediaSearchData.object.gsrsearch = 'intitle:' + _params.term; 90 | wikipediaSearchData.object.pilimit = 'max'; 91 | wikipediaSearchData.object.exlimit = 'max'; 92 | wikipediaSearchData.object.exintro = ''; 93 | 94 | wikipediaSearchData = this.fillDataInObjectByList(wikipediaSearchData, _params, [ 95 | 'prop', 'generator', 'gsrsearch', 'pilimit', 'exlimit', 'exintro', 'rvparse', 'formatversion', 'prop', 'pithumbsize', 'gsrlimit' 96 | ]); 97 | wikipediaSearchData.url = this.getApiBaseUrl(_params.lang); 98 | break; 99 | 100 | case "searchArticles": 101 | wikipediaSearchData.object.prop = 'extracts|pageimages|info'; 102 | wikipediaSearchData.object.generator = 'search'; 103 | wikipediaSearchData.object.gsrsearch = _params.term; 104 | wikipediaSearchData.object.pilimit = 'max'; 105 | wikipediaSearchData.object.exlimit = 'max'; 106 | wikipediaSearchData.object.exintro = ''; 107 | 108 | wikipediaSearchData = this.fillDataInObjectByList(wikipediaSearchData, _params, [ 109 | 'prop', 'generator', 'gsrsearch', 'pilimit', 'exlimit', 'exintro', 'rvparse', 'formatversion', 'prop', 'pithumbsize', 'gsrlimit' 110 | ]); 111 | wikipediaSearchData.url = this.getApiBaseUrl(_params.lang); 112 | break; 113 | 114 | case "getArticle": 115 | wikipediaSearchData.object.prop = 'extracts|pageimages|images|info'; 116 | wikipediaSearchData.object.titles = _params.term; 117 | 118 | wikipediaSearchData = this.fillDataInObjectByList(wikipediaSearchData, _params, [ 119 | 'prop', 'rvparse', 'formatversion', 'prop', 'pithumbsize', 'redirects' 120 | ]); 121 | wikipediaSearchData.url = this.getApiBaseUrl(_params.lang); 122 | break; 123 | } 124 | return wikipediaSearchData; 125 | }; 126 | }); --------------------------------------------------------------------------------