Crates.io | gitlab |
lib.rs | gitlab |
version | |
source | src |
created_at | 2016-01-22 11:02:57.58575 |
updated_at | 2025-01-08 18:15:35.599696 |
description | Gitlab API client. |
homepage | |
repository | https://gitlab.kitware.com/utils/rust-gitlab |
max_upload_size | |
id | 3952 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This library implements an interface to communicate with a Gitlab instance. Not all API endpoints are implemented, but patches are welcome.
The API is based off of the GitLab 17.7 API v4 and will likely aggressively track new API additions, so not all available parameters or types will support arbitrarily old GitLab instances (usually query parameters will be ignored and type fields cause deserialization errors).
For guidelines on contributions, see CONTRIBUTING.md
.
The endpoints that are supported all live under the api
module.
Each endpoint may be constructed using a "builder" pattern to provide supported
fields. To use an endpoint, you may query it using the
Query
trait. There are additional helpers to handle
different cases:
api::ignore
: Ignore the GitLab response (useful for
POST
or PUT
endpoints).api::paged
: Fetch results that are paginated.api::raw
: Return the raw data from GitLab instead of
deserializing into a structure.api::sudo
: Modify an endpoint using GitLab's sudo
parameter for masquerading as another user (requires an administrator
token).All endpoints return data types of the caller's choosing that implement
serde
's Deserialize
trait. Callers should define their own structures for
obtaining data from the API. This allows the structure to be more easily
changeable for different GitLab versions (rather than this crate being pinned
to a given version).
Since this crate follows Gitlab upstream, semantic versioning may not be possible. Instead, the crate uses the following versioning scheme:
Minor versions may fix bugs, add API endpoint bindings, or improve webhook coverage. It is recommended to depend on the full version of the crate since types may change in patch-level updates in order to match Gitlab's interface:
gitlab = "=0.1707.0"
Sometimes, the API will return null
for fields that have been added after the
entry was created. In these cases, mark the field as an Option
with a comment
describing why it is so.