class GitLab::REST

Overview

A HTTP client for GitLab instances.

Defined in:

gitlab/rest.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(uri : URI, token : -> String, user_agent = "bjjb/git-lab/rest") #

Creates a new GitLab HTTP REST 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, query) #

Deletes a resource and returns the response.


[View source]
def delete(resource) #

Deletes a resource and returns the response.


[View source]
def get(resource, query) #

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


[View source]
def get(resource) #

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


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

Patches a resource and returns the response.


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

Patches a resource and returns the response.


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

Creates a new resource in the collection 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, query, body) #

Replaces a resource and returns the response.


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

Replaces a resource and returns the response.


[View source]