Skip to content

meziantou/Meziantou.GitLabClient

Repository files navigation

Meziantou.GitLabClient

NuGet GitHub license

.NET client for GitLab API. Support .NET Standard 2.0.

How to install

Install the NuGet package Meziantou.GitLabCLient

How to use

Lots of methods are included in the client and accessible through GitLabClient:

using(var client = GitLabClient.Create("https://gitlab.com", personalAccessToken))
{
    var projects = await client.Projects.GetAllAsync().ToListAsync();
}

Even if a property is not directly exposed, you can access it using the dynamic type:

using(var client = GitLabClient.Create("https://gitlab.com", personalAccessToken))
{
    dynamic result = await client.Get<GitLabObject>("repository/new-method");
    string value = result.json_property_name;
}