pub struct GitLab { /* private fields */ }Expand description
GitLab client; stateless - the token rides on every request.
Implementations§
Source§impl GitLab
impl GitLab
Sourcepub fn new(config: &GitLabConfig) -> Self
pub fn new(config: &GitLabConfig) -> Self
Builds a client from the config; no network activity yet.
let config = GitLabConfig {
access_token: "glpat-xxxxxxxxxxxxxxxxxxxx".to_string(),
api_url: "https://gitlab.example.com".to_string(),
};
let client = GitLab::new(&config);Sourcepub async fn get_user_id(&self) -> Result<u32>
pub async fn get_user_id(&self) -> Result<u32>
The authenticated user’s numeric id (GET /user, read_user scope).
Sourcepub async fn get_today_commits(&self) -> Result<Vec<CommitInfo>>
pub async fn get_today_commits(&self) -> Result<Vec<CommitInfo>>
Today’s commits by the authenticated user, deduplicated across pushes, first message line only - the feed for task discovery.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GitLab
impl !UnwindSafe for GitLab
impl Freeze for GitLab
impl Send for GitLab
impl Sync for GitLab
impl Unpin for GitLab
impl UnsafeUnpin for GitLab
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more