class GitLab::Client

Overview

A HTTP client for GitLab instances.

Defined in:

gitlab/client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(uri : URI, token : -> String, ua = "bjjb/git-lab@#{VERSION}") #

Creates a new GitLab HTTP client for the given uri, which calls its token proc and sets the Authorization header for every request.


[View source]

Instance Method Detail

def delete(resource) #

Deletes a resource and returns the response.


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

Gets a response from the GitLab API for the given resource.


[View source]
def patch(resource, body) #

Patches a resource and returns the response.


[View source]
def post(collection, body) #

Creates a new resource in the collection and returns the response.


[View source]
def put(resource, body) #

Replaces a resource and returns the response.


[View source]