class

Gitlab::Client

Inherits Gitlab::Client::Version / Gitlab::Client::Key / Gitlab::Client::DeployKey / Gitlab::Client::Milestone / Gitlab::Client::MergeRequest / Gitlab::Client::Label / Gitlab::Client::Issue / Gitlab::Client::Note / Gitlab::Client::Commit / Gitlab::Client::Tag / Gitlab::Client::Branch / Gitlab::Client::RepositoryFile / Gitlab::Client::Repository / Gitlab::Client::Project / Gitlab::Client::Group / Gitlab::Client::Session / Gitlab::Client::User / Reference / Object

Gitlab API Client wrapper

See the Gitlab Offical API Document for more details.

Constructors

new(endpoint : String, token : String)

Create a new client

Gitlab::Client.new("<endpoint>", "<token")
Source

Instance methods

available?

Return a Bool status by gitlab api service

  • Return Bool
client.available? # => true
Source
delete(path : String, headers : Hash(String, _) | NamedTuple | Nil = nil, params : Hash(String, _) | NamedTuple | Nil = nil, form : Hash(String, _) | NamedTuple | Nil = nil, json : Hash(String, _) | NamedTuple | Nil = nil) : Halite::Response

Return a Halite::Response by sending a DELETE http request

client.delete("path", form: {
  first_name: "foo",
  last_name:  "bar"
})
Source
endpoint

The endpoint of Gitlab

Source
endpoint=(endpoint : String)

Setter for endpoint

Source
get(path : String, headers : Hash(String, _) | NamedTuple | Nil = nil, params : Hash(String, _) | NamedTuple | Nil = nil) : Halite::Response

Return a Halite::Response by sending a GET method http request

client.get("path", params: {
  first_name: "foo",
  last_name:  "bar"
})
Source
head(path : String, headers : Hash(String, _) | NamedTuple | Nil = nil, params : Hash(String, _) | NamedTuple | Nil = nil) : Halite::Response

Return a Halite::Response by sending a HEAD method http request

client.head("path", params: {
  first_name: "foo",
  last_name:  "bar"
})
Source
patch(path : String, headers : Hash(String, _) | NamedTuple | Nil = nil, params : Hash(String, _) | NamedTuple | Nil = nil, form : Hash(String, _) | NamedTuple | Nil = nil, json : Hash(String, _) | NamedTuple | Nil = nil) : Halite::Response

Return a Halite::Response by sending a PATCH http request

client.patch("path", form: {
  first_name: "foo",
  last_name:  "bar"
})
Source
post(path : String, headers : Hash(String, _) | NamedTuple | Nil = nil, params : Hash(String, _) | NamedTuple | Nil = nil, form : Hash(String, _) | NamedTuple | Nil = nil, json : Hash(String, _) | NamedTuple | Nil = nil) : Halite::Response

Return a Halite::Response by sending a POST http request

client.post("path", form: {
  first_name: "foo",
  last_name:  "bar"
})
Source
put(path : String, headers : Hash(String, _) | NamedTuple | Nil = nil, params : Hash(String, _) | NamedTuple | Nil = nil, form : Hash(String, _) | NamedTuple | Nil = nil, json : Hash(String, _) | NamedTuple | Nil = nil) : Halite::Response

Return a Halite::Response by sending a PUT http request

client.put("path", form: {
  first_name: "foo",
  last_name:  "bar"
})
Source
token

The token(private-token or OAuth2 access token) of Gitlab

Source
token=(token : String)

The token(private-token or OAuth2 access token) of Gitlab

Source

Nested types