Lab

Hex
Versionpipeline
statuscoverage
reportTravisEbertInline docsSize

Lab

An Elixir wrapper for the Gitlab API

Installation

Add lab to your list of dependencies in mix.exs:

def deps do
  [
    {:lab, "~> 0.1"}
  ]
end

Usage

Set your gitlab api endpoint in your mix config :

  config :lab,
    gitlab_api_endpoint: "https://git.lab/api/v4"

Or in your environment:

export GITLAB_API_ENDPOINT=https://git.lab/api/v4

Set your Gitlab API private token in your enviroment:

export GITLAB_API_PRIVATE_TOKEN=token

Examples

# All projects returned as list of %Lab.Project{}
projects = Lab.projects

# All Gitlab API resource options supported by default
projects = Lab.projects(per_page: 5)

# Single Project returned as %Lab.Project{}
project = Lab.project(1)

See the online documentation for further detail.

Reference

Attributions