polyoxide_core/lib.rs
1//! # polyoxide-core
2//!
3//! Core utilities and shared types for Polyoxide Polymarket API clients.
4//!
5//! This crate provides common functionality used across `polyoxide-clob`, `polyoxide-gamma`, and `polyoxide-data`:
6//! - Shared error types and error handling
7//! - HTTP client configuration
8//! - Request builder utilities
9//!
10//! ## HTTP Client
11//!
12//! Use [`HttpClientBuilder`] to create configured HTTP clients:
13//!
14//! ```
15//! use polyoxide_core::HttpClientBuilder;
16//!
17//! let client = HttpClientBuilder::new("https://api.example.com")
18//! .timeout_ms(60_000)
19//! .build()
20//! .unwrap();
21//! ```
22//!
23//! ## Error Handling
24//!
25//! Use the [`impl_api_error_conversions`] macro to reduce boilerplate in error types.
26
27#[macro_use]
28pub mod macros;
29
30pub mod auth;
31pub mod client;
32pub mod error;
33pub mod request;
34
35pub use auth::{current_timestamp, Base64Format, Signer};
36pub use client::{HttpClient, HttpClientBuilder, DEFAULT_POOL_SIZE, DEFAULT_TIMEOUT_MS};
37pub use error::ApiError;
38pub use request::{QueryBuilder, Request, RequestError};