Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit b7bbea7

Browse files
committed
Some documentation changes.
1 parent 51c67a9 commit b7bbea7

File tree

5 files changed

+554
-12
lines changed

5 files changed

+554
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
testing.js
22
lib/
3+
docs/
34

45
### Node ###
56
# Logs

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Paladins.js
2+
![NPM License](https://img.shields.io/npm/l/paladins.js.svg?style=flat) ![Downloads](https://img.shields.io/npm/dm/paladins.js.svg?style=flat)
3+
4+
Paladins.js is a package that helps Hi-Rez/Paladins developers communicate with the API.
5+
6+
## Install
7+
```
8+
$ npm install paladins.js
9+
```
10+
11+
## Cache Driver
12+
A cache driver is **highly** recommended. If there is no driver, it will create a new session on each request. This will make it so that your usage limits are hit within no time.
13+
14+
We use [cache-driver](https://www.npmjs.com/package/cache-driver) to provide flexibility in what kind of caching system you would like to use, as long as it's an implementation of `cache-driver` then it will work out of the box.
15+
16+
## Usage
17+
*The following examples are in TypeScript, which this package is written in.*
18+
19+
For the usage example's we'll be using [cache](https://www.npmjs.com/package/cache). We also need the `cache-driver` adapter for `cache` which is [here](https://www.npmjs.com/package/cache-driver-cache)
20+
21+
```
22+
$ npm install cache cache-driver-cache
23+
```
24+
25+
```javascript
26+
import API from "paladins.js";
27+
import { CacheAdapter } from "cache-driver-cache";
28+
29+
let api = new API("devId", "auhtKey", new CacheAdapter()); // API loaded and ready to go.
30+
31+
api.getItems().then((response: any) => {
32+
// Do something with response
33+
});
34+
```
35+
36+
## Documentation / Methods
37+
You can view all the available methods and documentation on the [PaladinsDev website](http://paladinsdev.com/docs/paladins.js/v/1.0.0/).

0 commit comments

Comments
 (0)