linear-api 0.1.0

Unofficial async Rust client for the Linear GraphQL API (API-key auth)
Documentation
#![forbid(unsafe_code)]
#![warn(missing_docs)]
#![doc = include_str!("../README.md")]
// `Error` intentionally carries rich context (rate-limit snapshots, GraphQL
// error lists) inline; boxing it would complicate every match site for a
// crate whose results are almost always immediately consumed.
#![allow(clippy::result_large_err)]

mod client;
mod error;
mod filter;
mod ids;
mod pagination;
mod types;
mod viewer;

pub mod comments;
pub mod issues;
pub mod labels;
pub mod projects;
pub mod relations;
pub mod workspace;

pub use client::{LinearClient, LinearClientBuilder, RateLimitInfo, RetryConfig};
pub use error::{Error, ErrorExtensions, GraphQlError, LinearErrorType, Result};
pub use filter::*;
pub use ids::*;
pub use pagination::{Page, PageInfo, collect_all, paginate};
pub use types::*;
pub use viewer::{Organization, Viewer};

/// Registry of every GraphQL document this crate ships, as `(operation name,
/// document text)` pairs. Consumed by the schema-validation test harness.
#[doc(hidden)]
pub fn all_documents() -> Vec<(&'static str, &'static str)> {
    [
        viewer::DOCUMENTS,
        issues::DOCUMENTS,
        projects::DOCUMENTS,
        workspace::DOCUMENTS,
        labels::DOCUMENTS,
        relations::DOCUMENTS,
        comments::DOCUMENTS,
    ]
    .concat()
}