1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! High-level API operations for GitLab resources.
//!
//! This module provides builder-pattern APIs for interacting with
//! GitLab resources in a fluent, ergonomic way.
//!
//! # API Patterns
//!
//! This library uses different patterns for different types of operations:
//!
//! ## 1. Resource-specific operations (via client methods)
//!
//! For operations on specific resources, use the client methods:
//!
//! ```no_run
//! # use lmrc_gitlab::GitLabClient;
//! # async fn example() -> Result<(), lmrc_gitlab::GitLabError> {
//! # let client = GitLabClient::new("https://gitlab.com", "token")?;
//! // Single resource operations
//! let pipeline = client.pipeline("project", 123).get().await?;
//! let job = client.job("project", 456).get().await?;
//!
//! // List operations with filters
//! let pipelines = client.pipelines("project")
//! .status(lmrc_gitlab::models::PipelineStatus::Failed)
//! .list()
//! .await?;
//! # Ok(())
//! # }
//! ```
//!
//! ## 2. Project-level operations
//!
//! For operations at the project scope (creating resources, etc.):
//!
//! ```no_run
//! # use lmrc_gitlab::GitLabClient;
//! # async fn example() -> Result<(), lmrc_gitlab::GitLabError> {
//! # let client = GitLabClient::new("https://gitlab.com", "token")?;
//! // Create/trigger new pipeline
//! let pipeline = client.project("myproject")
//! .create_pipeline()
//! .ref_name("main")
//! .variable("ENV", "prod")
//! .trigger()
//! .await?;
//! # Ok(())
//! # }
//! ```
//!
//! ## 3. Direct API access
//!
//! For operations not yet wrapped, use the underlying client:
//!
//! ```no_run
//! # use lmrc_gitlab::GitLabClient;
//! # use gitlab::api::Query;
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! # let client = GitLabClient::new("https://gitlab.com", "token")?;
//! // Access the raw gitlab crate client
//! let raw_client = client.client();
//!
//! // Use any gitlab API endpoint
//! // let endpoint = ...;
//! // let result = endpoint.query(raw_client)?;
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;
pub use ;
pub use VariableBuilder;