# angular-wiki-search

> AngularJS module for consuming Wikipedia API.

Latest version **1.0.0** (published 2016-01-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-wiki-search
pnpm add angular-wiki-search
yarn add angular-wiki-search
bun add angular-wiki-search
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-01-11 |
| First published | 2016-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | mudroljub |
| Maintainers | mudroljub |
| Keywords | AngularJS, Wikipedia |

## Links

- npm: https://www.npmjs.com/package/angular-wiki-search
- Repository: https://github.com/mudroljub/angular-wiki-search
- Homepage: https://github.com/mudroljub/angular-wiki-search#readme
- Issues: https://github.com/mudroljub/angular-wiki-search/issues
- npm.io page: https://npm.io/package/angular-wiki-search

## Recent versions

- 1.0.0 (latest) — 2016-01-11

## README

#[Angular Wiki Search](http://mudroljub.github.io/angular-wiki-search/)
AngularJS module for consuming Wikipedia API.

See it in action: [mudroljub.github.io/angular-wiki-search/](http://mudroljub.github.io/angular-wiki-search/)

## Install
Just download the directory and open index.html file. You can also do it developer way:

```sh
$ git clone https://github.com/mudroljub/angular-wiki-module.git
$ bower install
$ open index.html
```

If you don't use [Bower](http://bower.io/), you can manually resolve dependencies from bower.json file.

Enjoy power searching Wikipedia!

## Documentation
The main `WikiController` consists of two main public methods:
- `wiki.openArticle(title)`
- `wiki.searchWikipedia(term)`

Those methods getting data from [Wikipedia API](http://en.wikipedia.org/w/api.php) in JSONP format (see [API documentation](https://www.mediawiki.org/wiki/API:Main_page)).

Both methods have those common URL params:
```js
var params = {
    action: 'query',
    prop: 'extracts|pageimages',    // get article's content and images
    format: 'json',
    formatversion: 2,  // support utf-8
    callback: 'JSON_CALLBACK'
}
```

Specific params for `openArticle` method are:

```js
{
    titles: title,   // title is a variable
    redirects: ''  // auto-redirecting to an article
}
```

Specific params for `searchWikipedia` method are:

```js
{
    generator: 'search',
    gsrsearch: term,  // term is a variable
    pilimit: 'max', // enable images for all results
    exlimit: 'max', // enable content for all results
    exintro: ''    // get only article's intro
}
```

## To-do list
- error handling

---
_Source: https://npm.io/package/angular-wiki-search · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
