@alembic/nft-api-sdk
This is a TypeScript SDK for interacting with the NFT API. It simplifies the process of making requests to the API by providing convenient methods for various operations related to NFTs (Non-Fungible Tokens). These operations include managing and searching for assets, handling collections, and analyzing NFT data.
Installation
To add the @alembic/nft-api-sdk to your project, you can use npm or yarn:
npm install @alembic/nft-api-sdk
yarn add @alembic/nft-api-sdk
Usage
After installation, you can import NftApi
from the SDK in your TypeScript code:
import { NftApi } from '@alembic/nft-api-sdk';
Create an instance of NftApi
and call its methods to interact with the NFT API.
const nftApi = new NftApi();
const collections = await nftApi.collection.getCollections();
console.log(collections);
const filters = { };
const assets = await nftApi.asset.searchAssets(filters);
console.log(assets);
const collectionInfo = await nftApi.collection.getCollection('your_contract_address');
console.log(collectionInfo);