Skip to content

Commit

Permalink
Documentation on search drops
Browse files Browse the repository at this point in the history
  • Loading branch information
jm42 committed Apr 2, 2024
1 parent d1bdbdf commit 0a6084b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/pages/packages/drops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Update a Drop attributes
- Fetch a single Drop
- Fetch multiple Drops
- Search Drops

## Installation

Expand Down
31 changes: 31 additions & 0 deletions docs/pages/packages/drops/SearchDrops.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Search Drops

There are two ways that drops can be searched, by exact word in name or fuzzy
search in name and description.

## Exact word search

When searching for a whole word, use `fetch` method:

```typescript
const data: PaginatedResult<Drop> = await dropsClient.fetch({
sortField: DropsSortFields.Name,
sortDir: Order.ASC,
limit: 3,
offset: 0,
name: 'POAP',
});
```

## Fuzzy search

When given a generic search input, and to match any part of the words used in
the name of the description, use `search` method:

```typescript
const data: PaginatedResult<Drop> = await dropsClient.search({
limit: 3,
offset: 0,
search: 'POAP',
});
```
3 changes: 3 additions & 0 deletions docs/pages/packages/drops/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"SearchDrops": "Search Drops"
}
1 change: 1 addition & 0 deletions packages/drops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Update a Drop attributes
- Fetch a single Drop
- Fetch multiple Drops
- Search Drops

## Installation

Expand Down

0 comments on commit 0a6084b

Please sign in to comment.