README.md

=========
[](https://hex.pm/packages/lab)
[](https://gitlab.com/starbelly/lab/commits/master)
[](https://gitlab.com/starbelly/lab/commits/master)
[](https://travis-ci.org/starbelly/lab)
[](https://ebertapp.io/github/starbelly/lab)
[](http://inch-ci.org/github/starbelly/lab)


An Elixir wrapper for the Gitlab API
## Installation
Add lab to your list of dependencies in mix.exs:
```elixir
def deps do
[
{:lab, "~> 0.1"}
]
end
```
## Usage
Set your gitlab api endpoint in your mix config :
```elixir
config :lab,
gitlab_api_endpoint: "https://git.lab/api/v4"
```
Or in your environment:
```shell
export GITLAB_API_ENDPOINT=https://git.lab/api/v4
```
Set your Gitlab API private token in your enviroment:
```shell
export GITLAB_API_PRIVATE_TOKEN=token
```
### Examples
```elixir
# 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](http://hexdocs.pm/lab) for further detail.
## Reference
- [Gitlab API](https://docs.gitlab.com/ee/api/README.html)
## Attributions
- Powered by [Tesla](https://github.com/teamon/tesla)
- Inspirado from [NARKOZ/gitlab](https://github.com/NARKOZ/gitlab)
- Beaker logo provided by [cliparts](https://cliparts.zone)