class GitLab

Overview

A GitLab provides a simple API for interacting with a GitLab server.

Defined in:

gitlab.cr
gitlab/option_parser.cr

Constant Summary

VERSION = "0.1.0"

The version of the module.

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(uri : URI = @@uri, token : -> String = @@token, home : Path = @@home, user : String = @@user) #

Makes a new GitLab which can fetch request from uri using the result of calling token, and treats home as the root of its project tree.


[View source]

Class Method Detail

def self.git(name : String) #

Makes a new GitLab using values from the git configuration under name.


[View source]

Instance Method Detail

def config(path = ".") #

[View source]
def delete(resource) #

Deletes a resource.


[View source]
def get(resource, form = {} of String => Array(String)) #

Gets a resource.


[View source]
def home : Path #

The home path used to create the workdir tree manager


[View source]
def mutation(query, values = {} of String => String) #

Queries GraphQL with a mutation


[View source]
def option_parser #

[View source]
def patch(resource, params = {} of String => String) #

Modifies a resource.


[View source]
def post(collection, params = {} of String => String) #

Creates a new resource.


[View source]
def project?(path = ".") #

Returns a Project if the given Path represents a project.


[View source]
def put(resource, params = {} of String => String) #

Sets a resource.


[View source]
def query(query, values = {} of String => String) #

Queries GraphQL (with a query)


[View source]
def token : -> String #

The token proc used to create the client


[View source]
def uri : URI #

The URI used to create the client


[View source]
def user : String #

The username used to identify the user's branch of the workdir tree manager


[View source]