Skip to main content

wowlab_supabase/
lib.rs

1//! Typed client for Supabase's `PostgREST` and Storage HTTP APIs.
2//!
3//! # Example
4//!
5//! ```no_run
6//! use serde::Deserialize;
7//! use wowlab_supabase::{Result, SupabaseClient};
8//!
9//! #[derive(Deserialize)]
10//! struct User {
11//!     id: i64,
12//! }
13//!
14//! # async fn fetch_users() -> Result<Vec<User>> {
15//! let client = SupabaseClient::new("https://example.supabase.co", "project-api-key")?;
16//! client.get_json("users?select=id", "public").await
17//! # }
18//! ```
19
20#![expect(
21    clippy::multiple_crate_versions,
22    reason = "HTTP, test, and platform support dependencies currently resolve independently versioned transitive crates"
23)]
24
25mod client;
26mod errors;
27mod retry;
28mod storage;
29
30pub use client::SupabaseClient;
31pub use errors::SupabaseError;
32pub use retry::{RetryConfig, with_retry};
33
34/// Result returned by Supabase client operations.
35pub type Result<T> = std::result::Result<T, SupabaseError>;