Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Output:

In order to query the artifacts currently available on the EZKL Hub you can use the `getArtifacts` method.

This method accepts an options object which allows you to specify the `limit` (the max number of artifacts to return) and `skip` (the number of artifacts to skip). `skip` and `limit` can be used together for effective pagination. If no options are provided, the default values are `skip = 0` and `limit = 20`.
This method accepts an options object which allows you to specify the `first` (the max number of artifacts to return) and `skip` (the number of artifacts to skip). `skip` and `first` can be used together for effective pagination. If no options are provided, the default values are `skip = 0` and `first = 20`.

```typescript
type Artifact = {
Expand All @@ -76,13 +76,13 @@ type Artifact = {
type PageOptions =
| {
skip?: number
limit?: number
first?: number
}
| undefined

const pageOptions: PageOptions = {
skip: 0,
limit: 2,
first: 2,
}

const artifacts: Artifact[] = await hub.artifacts(pageOptions)
Expand Down