# Lion API

Lion is a basic localization service using `git` as the backend for storing translations.

## Request headers

Requests should have the `Lion-Api-Version` header set. The current API version is `v1`. If the header is not set, it is assumed to be the latest version.

Example header:

- `Lion-Api-Version: v1`

# Group Projects

## Project collection [/projects]

### List projects [GET]

List all configured projects

+ Request (application/json)

    + Header

              Lion-Api-Version: v1

+ Response 200 (application/json)

    + Header

              Lion-Api-Version: v1

    + Body

              {
                "projects": [
                    "projectA": {
                        "name" "projectA" // All project details
                    }
                ]
              }

## Project management [/project/{name}]

+ Parameters

    + name (required, string) ... Project name

### Get project [GET]

Fetch project details, given the projects' name.

+ Request (application/json)

    + Header

              Lion-Api-Version: v1

+ Response 200 (application/json)

    + Header

              Lion-Api-Version: v1

    + Body

              {
                "name": "Project name",
                "resources": [
                  "resource1",
                  "..."
                ]
              }

+ Response 404 (application/json)

    + Header

              Lion-Api-Version: v1

# Lion API

Lion is a basic localization service using `git` as the backend for storing translations.

## Request headers

Requests should have the `Lion-Api-Version` header set. The current API version is `v1`. If the header is not set, it is assumed to be the latest version.

Example header:

- `Lion-Api-Version: v1`

# Group Projects

## Project collection [/projects]

### List projects [GET]

List all configured projects

+ Request (application/json)

    + Header

              Lion-Api-Version: v1

+ Response 200 (application/json)

    + Header

              Lion-Api-Version: v1

    + Body

              {
                "projects": [
                    "projectA": {
                        "name" "projectA" // All project details
                        ...
                    }
                ]
              }

## Project management [/project/{slug}]

+ Parameters

    + slug (required, string) ... Project slug

### Get project [GET]

Fetch project details, given the projects' name.

+ Request (application/json)

    + Header

              Lion-Api-Version: v1

+ Response 200 (application/json)

    + Header

              Lion-Api-Version: v1

    + Body

              {
                "name": "Project name",
                "slug": "project-name",
                "resources": [
                  "resource1",
                  "..."
                ]
              }

+ Response 404 (application/json)

    + Header

              Lion-Api-Version: v1
