-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add list()
method
#82
Conversation
✅ Deploy Preview for blobs-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
README.md
Outdated
await store.delete('my-key') | ||
``` | ||
|
||
### `list(options?: { cursor?: string, paginate?: boolean. prefix?: string }): Promise<{ blobs: BlobResult[] }>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing directories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Done in 3c662f2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs the option as well as the response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 6788743.
README.md
Outdated
Optionally, you can choose to group blobs together under a common prefix and then browse them hierarchically when | ||
listing a store. To do this, use the `/` character in your keys to group them into multiple levels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be explicit in saying that this is like traversing a directory structure, as we are calling it directories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 6788743. Let me know if it's clearer.
README.md
Outdated
To drill down into a directory and get a list of its items, you can use the directory name as the `prefix` value. | ||
|
||
```javascript | ||
const { blobs, directories } = await store.list({ directories: true, prefix: 'mice/' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a note calling out the fact that they need to always include the trailing slash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 6788743.
Which problem is this pull request solving?
Adds a
list()
endpoint. Check the modified README for more information about the API.Closes https://github.com/netlify/pillar-runtime/issues/753.