Skip to content

Commit 77e36f2

Browse files
ryanioev0r0xclaude
committed
docs: remove inline imports from API reference examples
Snippets are code fragments, not standalone files — readers already import from opensea-js during setup. Removing imports keeps every example consistent and avoids churn from "missing import" fixes. Co-Authored-By: Damian <236994396+ev0r0x@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 392e241 commit 77e36f2

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

developerDocs/api-reference.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ This comprehensive reference documents all OpenSea API endpoints available throu
3232
Fetch metadata, traits, ownership information, and rarity for a single NFT.
3333

3434
```typescript
35-
import { Chain } from "opensea-js";
36-
3735
const { nft } = await openseaSDK.api.getNFT(
3836
"0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", // Contract address
3937
"1", // Token ID
@@ -229,8 +227,6 @@ console.log(collection.fees);
229227
Fetch a list of collections with filtering and sorting options.
230228

231229
```typescript
232-
import { CollectionOrderByOption, Chain } from "opensea-js";
233-
234230
const { collections, next } = await openseaSDK.api.getCollections(
235231
CollectionOrderByOption.SEVEN_DAY_VOLUME, // Sort by 7-day volume
236232
Chain.Mainnet, // Filter by chain
@@ -931,8 +927,6 @@ Events include sales, transfers, listings, offers, and cancellations.
931927
Fetch all events with optional filtering.
932928

933929
```typescript
934-
import { AssetEventType } from "opensea-js";
935-
936930
const { asset_events, next } = await openseaSDK.api.getEvents({
937931
event_type: AssetEventType.SALE,
938932
limit: 50,
@@ -1040,8 +1034,6 @@ asset_events.forEach((event) => {
10401034
Fetch events for a specific NFT.
10411035

10421036
```typescript
1043-
import { Chain } from "opensea-js";
1044-
10451037
const { asset_events } = await openseaSDK.api.getEventsByNFT(
10461038
Chain.Mainnet,
10471039
"0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
@@ -1246,8 +1238,6 @@ console.log(`${token.name} (${token.symbol})`);
12461238
Search across collections, tokens, NFTs, and accounts. Results are ranked by relevance.
12471239

12481240
```typescript
1249-
import { SearchResponse } from "opensea-js";
1250-
12511241
const results = await openseaSDK.api.search({
12521242
query: "bored ape",
12531243
chains: ["ethereum"], // Optional: filter by chain
@@ -1288,8 +1278,6 @@ results.results.forEach((result) => {
12881278
Most list endpoints support pagination using cursor-based navigation:
12891279

12901280
```typescript
1291-
import { OrderSide } from "opensea-js";
1292-
12931281
let cursor: string | undefined;
12941282
const allResults: any[] = [];
12951283

@@ -1329,8 +1317,6 @@ The SDK automatically handles rate limiting with exponential backoff:
13291317
## Error Handling
13301318

13311319
```typescript
1332-
import { OrderSide } from "opensea-js";
1333-
13341320
try {
13351321
const order = await openseaSDK.api.getOrder({
13361322
side: OrderSide.LISTING,

0 commit comments

Comments
 (0)