GitLabApiClient is a .NET rest client for GitLab API v4.
- Targets .NET Standard 2.0
- Fully async
- Thread safe.
- Multi core paging.
- Simple and natural to use.
- Handles URL encoding for you
// if you have auth token:varclient=newGitLabClient("https://gitlab.example.com","your_private_token");// if you want to use username & password:varclient=newGitLabClient("https://gitlab.example.com");awaitclient.LoginAsync("username","password");// create a new issue.awaitclient.Issues.CreateAsync("group/project",newCreateIssueRequest("issue title"));// list issues for a project with specified assignee and labels.awaitclient.Issues.GetAsync("group/project", o =>o.AssigneeId=100&&o.Labels==new[]{"test-label"});// create a new merge request featureBranch -> master.awaitclient.MergeRequests.CreateAsync("group/project",newCreateMergeRequest("featureBranch","master","Merge request title"){Labels=new[]{"bugfix"},Description="Implement feature"});// get a list of projects and find each project's README.varprojects=awaitClient.Projects.GetAsync();foreach(varprojectinprojects){varfile=awaitClient.Files.GetAsync(project,filePath:"README.md",reference:project.DefaultBranch);varreadme=file.ContentDecoded;// mad science goes here}