Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Packages

Kyle Klaus edited this page Oct 10, 2017 · 5 revisions

Browse all packages

Request

GET /api/packages HTTP/1.1
Authentication: Bearer some-token

Response

HTTP/1.1 200 OK

    [
        {
            "id": 1,
            "name": "Buildcraft",
            "slug": "buildcraft",
        },
        {
            "id": 2,
            "name": "Iron Tanks",
            "slug": "iron-tanks",
        }
    ]

Browse all releases that belong to a package

Request

GET /api/packages/{package_id}/releases HTTP/1.1
Authentication: Bearer some-token

Response

HTTP/1.1 200 OK

    [
        {
            "id": 1,
            "package_id": 1,
            "version": "7.1.22",
            "md5": "c18d9c4e25f2d3faef3f2bc998068861",
            "url": "https://s3-us-west-1.amazonaws.com/solder/mods/buildcraft/buildcraft-7.1.22.zip"
        },
        {
            "id": 2,
            "package_id": 1,
            "version": "7.1.23",
            "md5": "23ab5e2c34f62c1029bc14867185fe3",
            "url": "https://s3-us-west-1.amazonaws.com/solder/mods/buildcraft/buildcraft-7.1.23.zip"
        },
    ]

Read a package

Request

GET /api/packages/{package_id} HTTP/1.1
Authentication: Bearer some-token

Response

HTTP/1.1 200 OK

    {
        "id": 1,
        "name": "Buildcraft",
        "slug": "buildcraft",
    }

Add a package

Request

POST /api/packages HTTP/1.1
Authentication: Bearer some-token

    {
        "name": "Buildcraft",
        "slug": "buildcraft",
    }

Response

HTTP/1.1 200 OK

    {
        "id": 1,
        "name": "Buildcraft",
        "slug": "buildcraft",
    }