1.0.24 • Published 3 years ago

@poprank/sdk v1.0.24

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

PopRank SDK: API Client & Types

The PopRank SDK contains the building blocks needed to interact with and build on top of PopRank. In fact, the PopRank team uses the SDK to power https://poprank.io, @poprank/rankings, @poprank/opensea, and various other offerings.

The SDK is comprised of two main sections: client and types.

Getting Started

Installation

Install the NPM package.

yarn add @poprank/sdk

Client Setup

Import, configure, and instantiate the PopRank API client.

import { ClientConfig, PopRankClient } from '@poprank/sdk';

const config: ClientConfig = { // optional
    timeout: 10_000
};

const client = new PopRankClient(config);

Note: ClientConfig is a pass-through import of axios's AxiosRequestConfig. View all config options here.

Make API Calls

Make calls to the PopRank API with the newly instantiated PopRank API client.

const nft = await client.getNFT('thewickedcraniums', 420);

All client methods can be found here. For in-depth documentation on all the PopRank endpoints, see our API documentation.

Reference PopRank Models

You can also directly reference PopRank types/models, like so.

const nft: Nft = {
    collection: 'thewickedcraniums',
    id: '420',
    rating: 1196,
    ...
}

All types are found within the types directory.

Support

As always, don't hesitate to reach out to the PopRank team on Twitter or Discord if you have any questions!

1.0.19

3 years ago

1.0.18

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago