# marvel-api-hash-generator

> In this project we take need hash to work in Marvel API.

Latest version **1.0.3** (published 2019-03-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install marvel-api-hash-generator
pnpm add marvel-api-hash-generator
yarn add marvel-api-hash-generator
bun add marvel-api-hash-generator
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-03-21 |
| First published | 2019-03-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 26 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | mugan86 |

## Links

- npm: https://www.npmjs.com/package/marvel-api-hash-generator
- Repository: https://github.com/mugan86/marvel-api-hash-generator
- Homepage: https://github.com/mugan86/marvel-api-hash-generator#readme
- Issues: https://github.com/mugan86/marvel-api-hash-generator/issues
- npm.io page: https://npm.io/package/marvel-api-hash-generator

## Dependencies (1)

- [md5.js](https://npm.io/package/md5.js.md) ^1.3.5

## Recent versions

- 1.0.3 (latest) — 2019-03-21
- 1.0.2 — 2019-03-21
- 1.0.1 — 2019-03-21
- 1.0.0 — 2019-03-21

## README

# Marvel API Hash generator

In this project we take need hash to work in Marvel API.

## You need

* [Go to Marvel API Getting Started](https://developer.marvel.com/documentation/getting_started)
* Register in Marvel API.
* Go to **My Develop Account** section: [Link](https://developer.marvel.com/account)
* Take public and private keys
![Link](./screens/1-keys.png)
* Create script file and add this content to take hash value and try in Characters Request
```
const getApiHash = require('marvel-api-hash-generator').getApiHash;
const timeStamp = 1;
const privateKey = 'privateKeyValue';
const publicKey = 'publicVale';
const hashValue = getApiHash(timeStamp, privateKey, publicKey);

const requestConstantCharacters = 'https://gateway.marvel.com/v1/public/characters?';
const exampleUrl = `${requestConstantCharacters}ts=${timeStamp}&apikey=${publicKey}&hash=${hashValue}`;
// https://gateway.marvel.com/v1/public/characters?ts=1&apikey=<public-key>&hash=09fe991c34996e64c0424e446f27c9f0
console.log(exampleUrl);
```

## Use Take Hash value and play in interactive documentation

[Link to nteractive documentation](https://developer.marvel.com/docs)

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