<commit_before>**angular-wikipedia-api-factory** is an angularjs module with a wikipedia api factory.

[![npm version](https://badge.fury.io/js/angular-wikipedia-api-factory.png)](https://badge.fury.io/js/angular-wikipedia-api-factory)
[![Bower version](https://badge.fury.io/bo/angular-wikipedia-api-factory.png)](https://badge.fury.io/bo/angular-wikipedia-api-factory)
 
Author: <NAME> ([JohnnyTheTank](https://github.com/JohnnyTheTank))

## Usage

1. Install via either [bower](http://bower.io/), [npm](https://www.npmjs.com/) or downloaded files:
    1. `bower install --save angular-wikipedia-api-factory`
    2. `npm install --save angular-wikipedia-api-factory`
    3. download [angular-wikipedia-api-factory.zip](https://github.com/JohnnyTheTank/angular-wikipedia-api-factory/zipball/master)
2. Add `jtt_wikipedia` to your application's module dependencies.
3. Include dependencies in your HTML.
    1. When using bower:
    ```html
    <script src="bower_components/angular-wikipedia-api-factory/dist/angular-wikipedia-api-factory.min.js"></script>
    ```
    2. When using npm:
    ```html
    <script src="node_modules/angular-wikipedia-api-factory/dist/angular-wikipedia-api-factory.min.js"></script>
    ```
    3. when using downloaded files
    ```html
    <script src="angular-wikipedia-api-factory.min.js"></script>
    ```
4. Use the factory `wikipediaFactory`


### factory methods

#### searchArticles

```js
wikipediaFactory.searchArticles({
    term: '<TERM>', // Searchterm
    lang: '<LANGUAGE>', // (optional) default: 'en'
    gsrlimit: '<GS_LIMIT>', // (optional) default: 10. valid values: 0-500
    pithumbsize: '<PAGE_IMAGES_THUMBNAIL_SIZE>', // (optional) default: 400
    pilimit: '<PAGE_IMAGES_LIMIT>', // (optional) 'max': images for all articles, otherwise only for the first
    exlimit: '<EX_LIMIT>', // (optional) 'max': extracts for all articles, otherwise only for the first
    exintro: '<EX_INTRO>', // (optional) '1': if we just want the intro, otherwise it shows all sections
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});
```


```js
wikipediaFactory.searchArticlesByTitle({
    term: '<TERM>', // Searchterm
    lang: '<LANGUAGE>', // (optional) default: 'en'
    gsrlimit: '<GS_LIMIT>', // (optional) default: 10. valid values: 0-500
    pithumbsize: '<PAGE_IMAGES_THUMBNAIL_SIZE>', // (optional) default: 400
    pilimit: '<PAGE_IMAGES_LIMIT>', // (optional) 'max': images for all articles, otherwise only for the first
    exlimit: '<EX_LIMIT>', // (optional) 'max': extracts for all articles, otherwise only for the first
    exintro: '<EX_INTRO>', // (optional) '1': if we just want the intro, otherwise it shows all sections
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});
```

#### getArticle

```js
wikipediaFactory.getArticle({
    term: '<TERM>', // Searchterm
    lang: '<LANGUAGE>', // (optional) default: 'en'
    pithumbsize: '<PAGE_IMAGE_THUMBNAIL_SIZE>', // (optional) default: '400'
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});
```

## Wikipedia JSONP API

* Documentation: https://www.mediawiki.org/wiki/API:Main_page/en
* API Sandbox: https://www.mediawiki.org/wiki/Special:ApiSandbox

## More angular-api-factories
[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)



## License

MIT<commit_msg>docs: updated pgk manager badges<commit_after>**angular-wikipedia-api-factory** is an angularjs module with a wikipedia api factory.

[![npm version](https://badge.fury.io/js/angular-wikipedia-api-factory.svg)](https://badge.fury.io/js/angular-wikipedia-api-factory)
[![Bower version](https://badge.fury.io/bo/angular-wikipedia-api-factory.svg)](https://badge.fury.io/bo/angular-wikipedia-api-factory)
 
Author: <NAME> ([JohnnyTheTank](https://github.com/JohnnyTheTank))

## Usage

1. Install via either [bower](http://bower.io/), [npm](https://www.npmjs.com/) or downloaded files:
    1. `bower install --save angular-wikipedia-api-factory`
    2. `npm install --save angular-wikipedia-api-factory`
    3. download [angular-wikipedia-api-factory.zip](https://github.com/JohnnyTheTank/angular-wikipedia-api-factory/zipball/master)
2. Add `jtt_wikipedia` to your application's module dependencies.
3. Include dependencies in your HTML.
    1. When using bower:
    ```html
    <script src="bower_components/angular-wikipedia-api-factory/dist/angular-wikipedia-api-factory.min.js"></script>
    ```
    2. When using npm:
    ```html
    <script src="node_modules/angular-wikipedia-api-factory/dist/angular-wikipedia-api-factory.min.js"></script>
    ```
    3. when using downloaded files
    ```html
    <script src="angular-wikipedia-api-factory.min.js"></script>
    ```
4. Use the factory `wikipediaFactory`


### factory methods

#### searchArticles

```js
wikipediaFactory.searchArticles({
    term: '<TERM>', // Searchterm
    lang: '<LANGUAGE>', // (optional) default: 'en'
    gsrlimit: '<GS_LIMIT>', // (optional) default: 10. valid values: 0-500
    pithumbsize: '<PAGE_IMAGES_THUMBNAIL_SIZE>', // (optional) default: 400
    pilimit: '<PAGE_IMAGES_LIMIT>', // (optional) 'max': images for all articles, otherwise only for the first
    exlimit: '<EX_LIMIT>', // (optional) 'max': extracts for all articles, otherwise only for the first
    exintro: '<EX_INTRO>', // (optional) '1': if we just want the intro, otherwise it shows all sections
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});
```


```js
wikipediaFactory.searchArticlesByTitle({
    term: '<TERM>', // Searchterm
    lang: '<LANGUAGE>', // (optional) default: 'en'
    gsrlimit: '<GS_LIMIT>', // (optional) default: 10. valid values: 0-500
    pithumbsize: '<PAGE_IMAGES_THUMBNAIL_SIZE>', // (optional) default: 400
    pilimit: '<PAGE_IMAGES_LIMIT>', // (optional) 'max': images for all articles, otherwise only for the first
    exlimit: '<EX_LIMIT>', // (optional) 'max': extracts for all articles, otherwise only for the first
    exintro: '<EX_INTRO>', // (optional) '1': if we just want the intro, otherwise it shows all sections
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});
```

#### getArticle

```js
wikipediaFactory.getArticle({
    term: '<TERM>', // Searchterm
    lang: '<LANGUAGE>', // (optional) default: 'en'
    pithumbsize: '<PAGE_IMAGE_THUMBNAIL_SIZE>', // (optional) default: '400'
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});
```

## Wikipedia JSONP API

* Documentation: https://www.mediawiki.org/wiki/API:Main_page/en
* API Sandbox: https://www.mediawiki.org/wiki/Special:ApiSandbox

## More angular-api-factories
[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)



## License

MIT
{'fraction_non_alphanumeric': 0.1723221833111943, 'fraction_numerical': 0.007970051926095883, 'mean_word_length': 4.278521351179095, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 38, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4163339', 'n_tokens_mistral': 2780, 'n_tokens_neox': 2707, 'n_words': 553}