class GitLab
- GitLab
- Reference
- Object
Overview
A GitLab provides a simple API for interacting with a GitLab server.
Defined in:
gitlab.crgitlab/option_parser.cr
Constant Summary
-
VERSION =
"0.1.0" -
The version of the module.
Constructors
-
.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.
Class Method Summary
-
.git(name : String)
Makes a new GitLab using values from the git configuration under name.
Instance Method Summary
- #config(path = ".")
-
#delete(resource)
Deletes a resource.
-
#get(resource, form = {} of String => Array(String))
Gets a resource.
-
#home : Path
The home path used to create the workdir tree manager
-
#mutation(query, values = {} of String => String)
Queries GraphQL with a mutation
- #option_parser
-
#patch(resource, params = {} of String => String)
Modifies a resource.
-
#post(collection, params = {} of String => String)
Creates a new resource.
-
#project?(path = ".")
Returns a Project if the given Path represents a project.
-
#put(resource, params = {} of String => String)
Sets a resource.
-
#query(query, values = {} of String => String)
Queries GraphQL (with a query)
-
#token : -> String
The token proc used to create the client
-
#uri : URI
The URI used to create the client
-
#user : String
The username used to identify the user's branch of the workdir tree manager
Constructor Detail
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.
Class Method Detail
Makes a new GitLab using values from the git configuration under name.
Instance Method Detail
Queries GraphQL with a mutation