{"id":21292020,"url":"https://github.com/johnnythetank/angular-wikipedia-api-factory","last_synced_at":"2025-07-01T09:31:41.577Z","repository":{"id":57179391,"uuid":"61363514","full_name":"JohnnyTheTank/angular-wikipedia-api-factory","owner":"JohnnyTheTank","description":"AngularJS Factory for Wikipedia JSONP REST API","archived":false,"fork":false,"pushed_at":"2017-03-12T21:26:52.000Z","size":19,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T16:14:21.904Z","etag":null,"topics":["angular","angular-factory","angularjs","api","factory","wikipedia","wikipedia-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JohnnyTheTank.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-17T09:46:02.000Z","updated_at":"2023-02-07T04:58:14.000Z","dependencies_parsed_at":"2022-09-12T05:00:54.782Z","dependency_job_id":null,"html_url":"https://github.com/JohnnyTheTank/angular-wikipedia-api-factory","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/JohnnyTheTank/angular-wikipedia-api-factory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2Fangular-wikipedia-api-factory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2Fangular-wikipedia-api-factory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2Fangular-wikipedia-api-factory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2Fangular-wikipedia-api-factory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnnyTheTank","download_url":"https://codeload.github.com/JohnnyTheTank/angular-wikipedia-api-factory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2Fangular-wikipedia-api-factory/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262935810,"owners_count":23387259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-factory","angularjs","api","factory","wikipedia","wikipedia-api"],"created_at":"2024-11-21T13:47:14.028Z","updated_at":"2025-07-01T09:31:41.468Z","avatar_url":"https://github.com/JohnnyTheTank.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**angular-wikipedia-api-factory** is an angularjs module with a wikipedia api factory.\n\n[![npm version](https://badge.fury.io/js/angular-wikipedia-api-factory.svg)](https://badge.fury.io/js/angular-wikipedia-api-factory)\n[![Bower version](https://badge.fury.io/bo/angular-wikipedia-api-factory.svg)](https://badge.fury.io/bo/angular-wikipedia-api-factory)\n \nAuthor: Jonathan Hornung ([JohnnyTheTank](https://github.com/JohnnyTheTank))\n\n## Usage\n\n1. Install via either [bower](http://bower.io/), [npm](https://www.npmjs.com/) or downloaded files:\n    1. `bower install --save angular-wikipedia-api-factory`\n    2. `npm install --save angular-wikipedia-api-factory`\n    3. download [angular-wikipedia-api-factory.zip](https://github.com/JohnnyTheTank/angular-wikipedia-api-factory/zipball/master)\n2. Include dependencies in your HTML.\n    1. When using bower:\n    ```html\n    \u003cscript src=\"bower_components/angular-wikipedia-api-factory/dist/angular-wikipedia-api-factory.min.js\"\u003e\u003c/script\u003e\n    ```\n    2. When using npm:\n    ```html\n    \u003cscript src=\"node_modules/angular-wikipedia-api-factory/dist/angular-wikipedia-api-factory.min.js\"\u003e\u003c/script\u003e\n    ```\n    3. when using downloaded files\n    ```html\n    \u003cscript src=\"angular-wikipedia-api-factory.min.js\"\u003e\u003c/script\u003e\n    ```\n3. Add **`jtt_wikipedia`** to your application's module dependencies\n  \n    ```JavaScript\n    angular.module('app', ['jtt_wikipedia']);\n    ```\n4. Use the factory `wikipediaFactory`\n\n    ```JavaScript\n    angular.module('app')\n        .controller('appController', function($scope, wikipediaFactory){\n        \n            wikipediaFactory.getArticle({\n                term: 'Oktoberfest'\n            }).then(function (_data) {\n                //on success\n            });\n            \n        });\n    ```\n\n### factory methods\n\n#### searchArticles\n\n```js\nwikipediaFactory.searchArticles({\n    term: '\u003cTERM\u003e', // Searchterm\n    lang: '\u003cLANGUAGE\u003e', // (optional) default: 'en'\n    gsrlimit: '\u003cGS_LIMIT\u003e', // (optional) default: 10. valid values: 0-500\n    pithumbsize: '\u003cPAGE_IMAGES_THUMBNAIL_SIZE\u003e', // (optional) default: 400\n    pilimit: '\u003cPAGE_IMAGES_LIMIT\u003e', // (optional) 'max': images for all articles, otherwise only for the first\n    exlimit: '\u003cEX_LIMIT\u003e', // (optional) 'max': extracts for all articles, otherwise only for the first\n    exintro: '\u003cEX_INTRO\u003e', // (optional) '1': if we just want the intro, otherwise it shows all sections\n}).then(function (_data) {\n    //on success\n}).catch(function (_data) {\n    //on error\n});\n```\n\n\n```js\nwikipediaFactory.searchArticlesByTitle({\n    term: '\u003cTERM\u003e', // Searchterm\n    lang: '\u003cLANGUAGE\u003e', // (optional) default: 'en'\n    gsrlimit: '\u003cGS_LIMIT\u003e', // (optional) default: 10. valid values: 0-500\n    pithumbsize: '\u003cPAGE_IMAGES_THUMBNAIL_SIZE\u003e', // (optional) default: 400\n    pilimit: '\u003cPAGE_IMAGES_LIMIT\u003e', // (optional) 'max': images for all articles, otherwise only for the first\n    exlimit: '\u003cEX_LIMIT\u003e', // (optional) 'max': extracts for all articles, otherwise only for the first\n    exintro: '\u003cEX_INTRO\u003e', // (optional) '1': if we just want the intro, otherwise it shows all sections\n}).then(function (_data) {\n    //on success\n}).catch(function (_data) {\n    //on error\n});\n```\n\n#### getArticle\n\n```js\nwikipediaFactory.getArticle({\n    term: '\u003cTERM\u003e', // Searchterm\n    lang: '\u003cLANGUAGE\u003e', // (optional) default: 'en'\n    pithumbsize: '\u003cPAGE_IMAGE_THUMBNAIL_SIZE\u003e', // (optional) default: '400'\n}).then(function (_data) {\n    //on success\n}).catch(function (_data) {\n    //on error\n});\n```\n\n## Wikipedia JSONP API\n\n* Documentation: https://www.mediawiki.org/wiki/API:Main_page/en\n* API Sandbox: https://www.mediawiki.org/wiki/Special:ApiSandbox\n\n## More angular-api-factories\n[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)\n\n\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Fangular-wikipedia-api-factory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnnythetank%2Fangular-wikipedia-api-factory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Fangular-wikipedia-api-factory/lists"}