Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.51 KB

readme.md

File metadata and controls

46 lines (32 loc) · 1.51 KB

Unity Asset Store API Client

Build Status npm version npm downloads

THIS IS NOT AN OFFICIAL API CLIENT, this is just a wrapper for the endpoints from the publisher panel

How to use

Install

  • npm i unity-asset-store-api

Examples

import AssetStoreClient from "unity-asset-store-api";

const token = "YOUR_TOKEN_HERE";
const publisherID = 15803;
const client = new AssetStoreClient(token, publisherID, { timeout: 60000 });

// Optionally you can leave the publisher ID undefined
// and pass it as the last argument of each function

await client.apiKey();
await client.downloads(2019, 09);
await client.packages();
await client.publisherOverview();
await client.revenue();
await client.sales(2019, 09);
await client.salesPeriods();
await client.userOverview();
await client.verifyInvoice("INVOICE NO");
await client.logout(); // This invalidates the token

How to get your token

Head over to the asset store publisher panel, open the site cookies and find a cookie named kharma_session, its value is your token.
Do not make your token publicly available. Logging out invalidates the token.

License

MIT