GitLab.RestApiClient 2.0.3

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package GitLab.RestApiClient --version 2.0.3
                    
NuGet\Install-Package GitLab.RestApiClient -Version 2.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GitLab.RestApiClient" Version="2.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GitLab.RestApiClient" Version="2.0.3" />
                    
Directory.Packages.props
<PackageReference Include="GitLab.RestApiClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GitLab.RestApiClient --version 2.0.3
                    
#r "nuget: GitLab.RestApiClient, 2.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=GitLab.RestApiClient&version=2.0.3
                    
Install GitLab.RestApiClient as a Cake Addin
#tool nuget:?package=GitLab.RestApiClient&version=2.0.3
                    
Install GitLab.RestApiClient as a Cake Tool

GitLab.RestApiClient

Forked from GitLabApiClient, which has not been updated since 2021, in order to add some newer missing features.

Release Notes (since fork, most recent first)

Version 2.0.2

  • Add Project.GetAllMembersAsync()

Version 2.0.1

  • User date fields changed from string to DateTime
  • Add CRUD methods for Project members
  • Remove Project.GetUsers(), which isn't an API endpoint
  • Use DateTime for AddGroupMemberRequest.ExpiredAt
  • Add missing property bool User.Bot
  • Use DateTime rather than string for Project.LastActivityAt and User.Created_At
  • Update target framework to .NET 8
  • Update Newtonsoft.Json 12.0.3 to 13.0.3 (critical security issue)

Original Readme Content Below

This should be useful but may be out of date as I add new features

Main features

  • Targets .NET 8
  • Fully async
  • Thread safe.
  • Multi core paging.
  • Simple and natural to use.
  • Handles URL encoding for you

Quick start

Authenticate

// if you have auth token:
var client =  new GitLabClient("https://gitlab.example.com", "your_private_token");
// if you want to use username & password:
var client =  new GitLabClient("https://gitlab.example.com");
await client.LoginAsync("username", "password");

Use it

// create a new issue.
await client.Issues.CreateAsync("group/project", new CreateIssueRequest("issue title"));

// list issues for a project  with specified assignee and labels.
await client.Issues.GetAsync("group/project", o => o.AssigneeId = 100 && o.Labels == new[] { "test-label" });

// create a new merge request featureBranch -> master.
await client.MergeRequests.CreateAsync("group/project", new CreateMergeRequest("featureBranch", "master", "Merge request title")
{
    Labels = new[] { "bugfix" },
    Description = "Implement feature"
});

// get a list of projects and find each project's README.
var projects = await Client.Projects.GetAsync();
foreach (var project in projects)
{
    var file = await Client.Files.GetAsync(project, filePath: "README.md", reference: project.DefaultBranch);
    var readme = file.ContentDecoded;
    // mad science goes here
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.0-alpha.1 0 5 hours ago
2.0.3 73 2 days ago
2.0.2 58 2 days ago
2.0.1 164 21 days ago
2.0.0-rc.1 185 a month ago

Add Project.GetAllMembers()