Skip to main content

pastebin_ai/
lib.rs

1//! pastebin-ai library crate
2//!
3//! This crate provides the core API client for [pastebin.ai](https://pastebin.ai).
4//! It includes types and methods for creating, retrieving, and deleting pastes,
5//! both anonymously and with authentication.
6//!
7//! # Example
8//!
9//! ```no_run
10//! use pastebin_ai::api::{PastebinClient, CreatePasteRequest, PasteVisibility, PasteExpiration, PasteCategory};
11//!
12//! let client = PastebinClient::new().unwrap();
13//! let request = CreatePasteRequest {
14//!     content: "Hello, pastebin.ai!".to_string(),
15//!     title: Some("Test Paste".to_string()),
16//!     language: Some("rust".to_string()),
17//!     visibility: Some(PasteVisibility::Public),
18//!     expiration: Some(PasteExpiration::Day1),
19//!     category: Some(PasteCategory::Code),
20//!     tags: Some("example,test".to_string()),
21//!     max_views: Some(100),
22//!     password: None,
23//!     burn_after_read: Some(false),
24//!     folder_id: None,
25//!     encrypted: None,
26//! };
27//! let response = client.create_paste(request).unwrap();
28//! println!("Paste URL: {}", response.url);
29//! ```
30
31pub mod api;
32pub mod config;