Update readme

This commit is contained in:
Hamcha 2019-11-21 17:02:26 +01:00
parent 748cb12c2c
commit 5f85d3e0cf
Signed by: hamcha
GPG Key ID: 44AD3571EB09A39E
1 changed files with 39 additions and 2 deletions

View File

@ -1,8 +1,45 @@
# mkm junk rare finder
## Build rare db
## Requirements
- Node
- yarn
## How to use
### Get dependencies
Just run `yarn`
### Get API keys
Go to https://www.cardmarket.com/en/Magic/Account/API and create a Dedicated app.
Put the keys in your environment like so:
```sh
export APP_TOKEN=<App token>
export APP_SECRET=<App secret>
export ACCESS_TOKEN=<Access token>
export ACCESS_SECRET=<Access token secret>
```
### Build card db
To use the rare finder, you'll need to build the rare db
1. Download this: https://www.mtgjson.com/files/AllPrintings.json
2. Run `yarn convert-db`
2. Run `yarn import-db`
It will create a file called `mcmCards.json`
## Fetch all cards listed by a user
1. `yarn fetch <userid>`
2. `yarn find <userid>`
User ID can be either a username or user id on cardmarket
## Create a cube out of the cheap rares!
WIP, will be `yarn cube <userid>`