# eve-asset

> Simple asset handler for ESI

Latest version **1.0.0** (published 2020-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install eve-asset
pnpm add eve-asset
yarn add eve-asset
bun add eve-asset
```

## 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 | 2020-07-20 |
| First published | 2020-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Michiel van der Velde |
| Maintainers | michielvdvelde |

## Links

- npm: https://www.npmjs.com/package/eve-asset
- Repository: https://github.com/MichielvdVelde/eve-asset
- Homepage: http://github.com/MichielvdVelde/eve-asset
- Issues: https://github.com/MichielvdVelde/eve-asset/issues
- npm.io page: https://npm.io/package/eve-asset

## Recent versions

- 1.0.0 (latest) — 2020-07-20

## README

# Eve Asset

Module to fetch assets from ESI.
Uses [eve-esi-client](https://github.com/MichielvdVelde/eve-esi) to manage
tokens.

## Example

Convoluted example to show off the asset handler. See the eve-esi-client
documentation to learn about the client and token management.

```ts
import ESI from 'eve-esi-client'

import AssetHandler, {
  Source
} from 'eve-asset'

const provider = new Provider()
const esi = new ESI({ provider })

async function run () {
  // We assume the provider has a token for the given
  // character ID and scope combo
  const token = await provider.getToken(
    1234, // character ID
    'esi-assets.read_assets.v1' // scope(s)
  )
  
  const handler = new AssetHandler(
    esi,
    Source.CHARACTER, // contract source, character or corporation
    1234, // contract source ID
    {
      token // token to use
    }
  )
  
  for await (const asset of handler.fetch()) {
    console.log(asset.type_id)
  }
}
```

## License

Copyright 2020 Michiel van der Velde.

This software is licensed under [the MIT License](LICENSE).

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