An Elixir wrapper for the Gitlab API
Installation
Add lab to your list of dependencies in mix.exs:
def deps do
[
{:lab, "~> 0.1"}
]
endUsage
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/v4Set your Gitlab API private token in your enviroment:
export GITLAB_API_PRIVATE_TOKEN=tokenExamples
# 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
- Powered by Tesla
- Inspirado from NARKOZ/gitlab
- Beaker logo provided by cliparts