2023-01-30 13:35:09 +01:00
2022-12-27 11:15:03 +01:00
2021-05-23 19:51:05 +02:00
2021-05-20 23:58:08 +02:00
2023-01-30 13:35:09 +01:00

Logo

Docker Minecraft Api

Serve information about minecraft docker mods, their available versions and needed executables.


Built With

Laravel


Table of Contents
  1. Usage
  2. Contributing
  3. Tests
  4. Contact
  5. License

Usage

An automatically generated and interactive API documentation with (live) responses is available at /idoc.


Mods

/api/v1/mods: Get all mods

  • Include: revisions | revisions.executable
  • Sort: name | projectUrl
  • Example: /api/v1/mods?include=revisions.executable&sort[projectUrl]
Example response
{
  "data": [
    {
      "id": 427,
      "name": "10 YEARS OF MINECRAFT MAP",
      "mindRam": 2048,
      "projectUrl": "https://www.minecraft.net"
    },
    {
      "id": 428,
      "name": "Technic - The 1.7.10 Pack",
      "mindRam": 4096,
      "projectUrl": "https://www.technicpack.net/modpack/the-1710-pack.453902"
    }
  ]
}

/api/v1/mods/{id}: Get mod by id

  • Include: revisions | revisions.executable
  • Sort: name | projectUrl
  • Example: /api/v1/mods/1337?include=revisions.executable&sort[projectUrl]
Example response
{
  "data": {
    "id": 426,
    "name": "Minecraft Vanilla",
    "mindRam": 2048,
    "projectUrl": "https://www.minecraft.net"
  }
}

Revisions

/api/v1/revisions: Get all revisions

  • Include: executable | mod | executable,mod
  • Sort: version
  • Example: /api/v1/revisions?include=executable,mod&sort[version]
Example response
{
  "data": [
    {
      "id": 7542,
      "modId": 426,
      "executableId": 8,
      "version": "1.19.3"
    },
    {
      "id": 7543,
      "modId": 426,
      "executableId": 8,
      "version": "1.19.2"
    }
  ]
}

/api/v1/revisions/{id}: Get revision by id

  • Include: executable | mod | executable,mod
  • Sort: version
  • Example: /api/v1/revisions/1337?include=executable,mod&sort[version]
Example response
{
  "data": {
    "id": 7556,
    "modId": 426,
    "executableId": 5,
    "version": "1.16"
  }
}

Executables

/api/v1/executables: Get all executables

  • Include: revisions | revisions.mod
  • Sort: name | key
  • Example: /api/v1/executables?include=revisions.mod&sort[name]
Example response
{
  "data": [
    {
      "id": 5,
      "name": "Java 8",
      "key": "JAVA_8"
    },
    {
      "id": 6,
      "name": "Java 11",
      "key": "JAVA_11"
    }
  ]
}

/api/v1/executables/{id}: Get executable by id

  • Include: revisions | revisions.mod
  • Sort: name | key
  • Example: /api/v1/executables/1337?include=revisions.mod&sort[name]
Example response
{
  "data": {
    "id": 5,
    "name": "Java 8",
    "key": "JAVA_8"
  }
}

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. Before cloning this project, you should ensure that your local machine has PHP and Composer installed. To get a local copy up and running follow these steps.

  1. Clone the repo and install composer packages:
git clone https://gitlab.4players.de/4np/apis/docker-minecraft-api.git
composer install
  1. After composer installation create .env file in your project root folder & copy everything from .env.example file into .env file. Then run php artisan key:generate, which will generate an APP_KEY in .env file for you. After, setup your DB_DATABASE, DB_USERNAME & DB_PASSWORD in .env file.

  2. Run migrations and import json to database:

php artisan migrate
php artisan json:import
  1. Serve the project via php artisan serve or Laravel Homestead.

Tests

Tests are available.
A HTML coverage report is available in tests/Coverage.


Contact

Marlon Maschkiwitz - marlon.maschkiwitz@4players.io
Project Link - https://gitlab.4players.de/4np/apis/docker-minecraft-api


License

Distributed under the MIT License. See LICENSE.txt for more information.

Description
No description provided
Readme 38 MiB
Languages
TypeScript 51.5%
JavaScript 42%
CSS 5.8%
HTML 0.7%