Skip to content

Commit

Permalink
chore(docs): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Nov 28, 2024
1 parent b4edf47 commit 8fb1f24
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1577,13 +1577,15 @@ const observers = await io.getPrescribedObservers({ epochIndex: 0 });

#### `getPrimaryNames({ cursor, limit, sortBy, sortOrder })`

Retrieves all primary names across all gateways, paginated and sorted by the specified criteria. The `cursor` used for pagination is the last name from the previous request.
Retrieves all primary names paginated and sorted by the specified criteria. The `cursor` used for pagination is the last name from the previous request.

```typescript
const io = IO.init();
const names = await io.getPrimaryNames({
cursor: 'ar-io',
limit: 2,
cursor: 'ao', // this is the last name from the previous request
limit: 1,
sortBy: 'startTimestamp',
sortOrder: 'desc',
});
```

Expand All @@ -1593,10 +1595,10 @@ const names = await io.getPrimaryNames({
```json
{
"sortOrder": "desc",
"hasMore": false,
"totalItems": 1,
"limit": 100,
"sortBy": "name",
"hasMore": true,
"totalItems": 100,
"limit": 1,
"sortBy": "startTimestamp",
"items": [
{
"owner": "HwFceQaMQnOBgKDpnFqCqgwKwEU5LBme1oXRuQOWSRA",
Expand Down

0 comments on commit 8fb1f24

Please sign in to comment.