Skip to content

Commit aadadb6

Browse files
ryanioev0r0xclaude
authored
docs: remove inline imports from API reference examples (#1958)
* docs: add missing imports to API reference examples Add Chain and OrderSide imports to getNFT, pagination, and error handling examples to make them copy-paste ready. Co-Authored-By: Damian <236994396+ev0r0x@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 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> --------- Co-authored-by: Damian <236994396+ev0r0x@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3e57246 commit aadadb6

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

developerDocs/api-reference.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ console.log(collection.fees);
227227
Fetch a list of collections with filtering and sorting options.
228228

229229
```typescript
230-
import { CollectionOrderByOption, Chain } from "opensea-js";
231-
232230
const { collections, next } = await openseaSDK.api.getCollections(
233231
CollectionOrderByOption.SEVEN_DAY_VOLUME, // Sort by 7-day volume
234232
Chain.Mainnet, // Filter by chain
@@ -929,8 +927,6 @@ Events include sales, transfers, listings, offers, and cancellations.
929927
Fetch all events with optional filtering.
930928

931929
```typescript
932-
import { AssetEventType } from "opensea-js";
933-
934930
const { asset_events, next } = await openseaSDK.api.getEvents({
935931
event_type: AssetEventType.SALE,
936932
limit: 50,
@@ -1038,8 +1034,6 @@ asset_events.forEach((event) => {
10381034
Fetch events for a specific NFT.
10391035

10401036
```typescript
1041-
import { Chain } from "opensea-js";
1042-
10431037
const { asset_events } = await openseaSDK.api.getEventsByNFT(
10441038
Chain.Mainnet,
10451039
"0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
@@ -1244,8 +1238,6 @@ console.log(`${token.name} (${token.symbol})`);
12441238
Search across collections, tokens, NFTs, and accounts. Results are ranked by relevance.
12451239

12461240
```typescript
1247-
import { SearchResponse } from "opensea-js";
1248-
12491241
const results = await openseaSDK.api.search({
12501242
query: "bored ape",
12511243
chains: ["ethereum"], // Optional: filter by chain

0 commit comments

Comments
 (0)