Logo

Docker Minecraft Api

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


### Built With [![Laravel][Laravel.com]][Laravel-url]
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

```json { "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]` ```json { "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]` **/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 ``` 2. 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. 3. Run migrations and import json to database: ``` php artisan migrate php artisan json:import ``` 4. Serve the project via `php artisan serve` or [Laravel Homestead](https://fourplayers.atlassian.net/wiki/spaces/4NET/pages/1035206657/Homestead+Installation).
## 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. [contributors-shield]: https://img.shields.io/github/contributors/github_username/repo_name.svg?style=for-the-badge [contributors-url]: https://github.com/github_username/repo_name/graphs/contributors [forks-shield]: https://img.shields.io/github/forks/github_username/repo_name.svg?style=for-the-badge [forks-url]: https://github.com/github_username/repo_name/network/members [stars-shield]: https://img.shields.io/github/stars/github_username/repo_name.svg?style=for-the-badge [stars-url]: https://github.com/github_username/repo_name/stargazers [issues-shield]: https://img.shields.io/github/issues/github_username/repo_name.svg?style=for-the-badge [issues-url]: https://github.com/github_username/repo_name/issues [license-shield]: https://img.shields.io/github/license/github_username/repo_name.svg?style=for-the-badge [license-url]: https://github.com/github_username/repo_name/blob/master/LICENSE.txt [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555 [linkedin-url]: https://linkedin.com/in/linkedin_username [product-screenshot]: images/screenshot.png [Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white [Next-url]: https://nextjs.org/ [React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB [React-url]: https://reactjs.org/ [Vue.js]: https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D [Vue-url]: https://vuejs.org/ [Angular.io]: https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white [Angular-url]: https://angular.io/ [Svelte.dev]: https://img.shields.io/badge/Svelte-4A4A55?style=for-the-badge&logo=svelte&logoColor=FF3E00 [Svelte-url]: https://svelte.dev/ [Laravel.com]: https://img.shields.io/badge/Laravel-FF2D20?style=for-the-badge&logo=laravel&logoColor=white [Laravel-url]: https://laravel.com [Bootstrap.com]: https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge&logo=bootstrap&logoColor=white [Bootstrap-url]: https://getbootstrap.com [JQuery.com]: https://img.shields.io/badge/jQuery-0769AD?style=for-the-badge&logo=jquery&logoColor=white [JQuery-url]: https://jquery.com