thaler 0.1.0

The Thaler API: financial data from SEC filings, with the source filing for every value.
Documentation
//! The [Thaler API](https://thaler.sh/developers) from Rust: financial data
//! from SEC filings, with the source filing for every value.
//!
//! ```no_run
//! use thaler::{Client, MetricPeriod};
//!
//! # async fn example() -> Result<(), thaler::Error> {
//! let client = Client::from_env()?; // THALER_API_KEY, or Client::new("thaler_…")
//! let rows = client
//!     .metrics("AAPL")
//!     .period(MetricPeriod::Annual)
//!     .keys(["revenue", "net_income"])
//!     .send()
//!     .await?;
//! for row in &rows.data {
//!     println!("{:?} {} {}", row.fiscal_year, row.metric_key, row.value);
//! }
//! println!("{} left this month", rows.rate_limit.and_then(|l| l.month).and_then(|m| m.remaining).unwrap_or(0));
//! # Ok(())
//! # }
//! ```
//!
//! Every figure is a [`Decimal`] (a decimal string, exact to the digit as
//! filed), every day a [`chrono::NaiveDate`], and every answer a
//! [`Response`] carrying the request ID and the account's limits beside
//! its `data`. The client keeps at most four requests in flight, waits when
//! the minute's limit is spent, retries a 429 after its `Retry-After` and a
//! 500, 502, 503 or 504 after a growing pause, and returns a typed [`Error`]
//! for the rest.
//!
//! The types in [`types`] are generated from the API's OpenAPI document;
//! [`API_VERSION`] names the document they came from.

#![forbid(unsafe_code)]
#![warn(missing_docs)]

pub mod client;
mod decimal;
pub mod error;
pub mod filters;
pub mod ratelimit;
#[allow(missing_docs)]
pub mod types;

pub use client::{
    Client, ClientBuilder, DEFAULT_BASE_URL, FilingRequest, FilingsDayRequest, FilingsRequest,
    HolderRequest, HoldersRequest, InsiderActivityRequest, MetricCatalogRequest,
    MetricLineageRequest, MetricRevisionsRequest, MetricsRequest, PricesRequest, ProfileRequest,
    RawConceptsRequest, ReleaseRequest, Response, ScreenRequest, SearchHoldersRequest,
    SearchSecuritiesRequest, SegmentsRequest,
};
pub use decimal::{Decimal, NotADecimal};
pub use error::{ApiError, ApiErrorKind, Error};
pub use filters::{Clause, ClauseValue, Op};
pub use ratelimit::{RateLimit, Window};
pub use types::*;

/// The crate's version, as the User-Agent announces it.
pub const VERSION: &str = env!("CARGO_PKG_VERSION");