GithubHelp home page GithubHelp logo

puzzelsolutions / gitlabapiclient Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nmklotas/gitlabapiclient

0.0 8.0 0.0 134 KB

GitLab API client

License: MIT License

PowerShell 1.15% Dockerfile 0.28% Shell 0.71% C# 97.86%

gitlabapiclient's Introduction

GitLabApiClient

Build status Build Status NuGet
GitLabApiClient is a .NET rest client for GitLab API v4 (https://docs.gitlab.com/ce/api/README.html).

Main features

  1. Targets .NET Standard 2.0.
  2. Fully async.
  3. Thread safe.
  4. Multi core paging.
  5. Simple and natural to use.

Quick start

  1. 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");
  1. Use it:
// create a new issue.
await client.Issues.CreateAsync(new CreateIssueRequest("projectId", "issue title"));  

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

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

Currently supported GitLab APIs:

  1. Issues API:
    Create issue.
    Update issue.
    Query issues.

  2. Merges API:
    Create merge request.
    Update merge request.
    Accept merge request.
    Delete merge request.
    Query merge requests.

  3. Projects API: Create project.
    Update project.
    Delete project.
    Get project users.
    Query projects.

  4. Users API:
    Create user.
    Update user.
    Delete user.
    Get current user session.
    Query users.

  5. Groups API (contributed by @ilijamitkov):
    Create group.
    Get projects for a group.
    Transfer group.
    Update group.
    Delete group.
    Sync group with linked LDAP group.
    Create LDAP group link.
    Delete LDAP group link.
    Delete LDAP for a specific LDAP provider.
    Query groups.

gitlabapiclient's People

Contributors

nmklotas avatar ilijamitkov avatar qayshp avatar ahaeber avatar

Watchers

Morten Trydal avatar James Cloos avatar  avatar  avatar Sven Ståle Osa avatar Kjetil Johannesen avatar Sven Ståle Osa avatar Gunnar Grenlee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.