snipp-gg/snipp-rust
crates.io/crates/snipp
Installation
Add to yourCargo.toml:
Getting started
Methods
All methods areasync and return Result<T, SnippError>.
get_user(id, options)
Fetch a user by ID. Pass "@me" for the authenticated user.
get_post(code)
Fetch a post by its share code.
upload(path, privacy)
Upload a file from disk.
list_uploads()
List the authenticated user’s recent uploads.
edit_upload(code, options)
Edit an existing upload’s title, description, or privacy.
delete_upload(filename)
Delete an upload by its filename.
discover()
Browse public uploads from the community.
list_blocks()
List the users you have blocked.
block_user(target_id)
Block a user by their ID.
unblock_user(target_id)
Unblock a user by their ID.
Error handling
All errors are returned asSnippError, which covers API errors, HTTP errors, deserialization failures, and IO errors.

