# gw2_api_miniwrapper

> Guildwars 2 API Wrapper

Latest version **2.1.6** (published 2015-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install gw2_api_miniwrapper
pnpm add gw2_api_miniwrapper
yarn add gw2_api_miniwrapper
bun add gw2_api_miniwrapper
```

## 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 | 2.1.6 |
| Published | 2015-12-30 |
| First published | 2015-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Mievstac |
| Maintainers | mievstac |
| Keywords | guild, wars, 2, guildwars, Guildwars, GUILDWARS, guildwars2, API, Api, api, Wrapper, WRAPPER, wrapper |

## Links

- npm: https://www.npmjs.com/package/gw2_api_miniwrapper
- Repository: https://github.com/mievstac/gw2_api_miniwrapper
- Homepage: https://github.com/mievstac/gw2_api_miniwrapper#readme
- Issues: https://github.com/mievstac/gw2_api_miniwrapper/issues
- npm.io page: https://npm.io/package/gw2_api_miniwrapper

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^2.2.0

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 2.1.6 (latest) — 2015-12-30
- 2.1.5 — 2015-12-30
- 2.1.4 — 2015-12-30
- 2.1.3 — 2015-12-30
- 2.1.2 — 2015-12-30
- 2.1.1 — 2015-12-30
- 2.1.0 — 2015-12-30
- 2.0.5 — 2015-12-29
- 2.0.4 — 2015-12-29
- 2.0.3 — 2015-12-29
- 2.0.2 — 2015-12-29
- 2.0.1 — 2015-12-29
- 2.0.0 — 2015-12-28
- 1.0.6 — 2015-12-28
- 1.0.5 — 2015-12-28
- … 5 more at https://npm.io/package/gw2_api_miniwrapper/versions

## README

# GuildWars 2 API Wrapper
Lightweight, simple to use GuildWars 2 API Wrapper


### Version
2.1.6

## Added Browser support (webpack / browserify)


### How to Install
 
```sh
npm i gw2_api_miniwrapper --save
```
To transpile / test:
```sh
git clone https://github.com/mievstac/gw2_api_miniwrapper.git
cd gw2_api_miniwrapper
npm install
```

Transpile Es6 --> Es5
```sh
npm install -g gulp
cd gw2_api_miniwrapper
gulp default
```

### How to use

In depth Wiki: https://github.com/mievstac/gw2_api_miniwrapper/wiki

*ES 6*
```javascript
import gw2Api from 'gw2_api_miniwrapper';

gw2Api({
    endpoints: 'items'
}).then(function (items) {
    console.log(items);
}).catch(function (error) {
    console.log(error);
});
```

*ES 5*
```javascript
var gw2Api = require('./index').default;

gw2Api({
    endpoints: 'items'
}).then(function (items) {
    console.log(items);
}).catch(function (error) {
    console.log(error);
});
```

### Examples
```javascript
import gw2Api from 'gw2_api_miniwrapper';

gw2Api({ // get All items
    endpoints: 'items'
}).then(function (items) {
    console.log(items);
}).catch(function (error) {
    console.log(error);
});

gw2Api({ // get items 1 and 2
    endpoints: 'items',
    ids: [1, 2]
}).then(function (items) {
    console.log(items);
}).catch(function (error) {
    console.log(error);
});

gw2Api({ //search for recipe input, ID 46731
    endpoints: ['recipes','search'],
    input: '46731' //switch to output: <ID> for output
}).then(function(data){
    console.log(data);
})

gw2Api({  // Account endpoint (apiKey required)
    endpoints: 'account',
    apiKey: 'APIKEY_HERE'
}).then(function (data) {
    console.log(data);
}).catch(function (error) {
    console.log(error);
})



```

### Todos

 - TESTS

License
----

MIT

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