Files
seatmapv2/README.md
2023-01-30 12:36:19 +01:00

5.3 KiB

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. Contact
  4. 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]

/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]

Revisions

/api/v1/revisions: Get all revisions

  • Include: executable | mod | executable,mod
  • Sort: version
  • Example: /api/v1/revisions?include=executable,mod&sort[version]

/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]

Executables

/api/v1/executables: Get all executables

  • Include: revisions | revisions.mod
  • Sort: name | key
  • Example: /api/v1/executables?include=revisions.mod&sort[name]

/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]

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.

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.