GithubHelp home page GithubHelp logo

games647 / mc-rest-api Goto Github PK

View Code? Open in Web Editor NEW
3.0 5.0 1.0 108 KB

A webservice for querying and caching data from the Mojang API servers

License: MIT License

PHP 99.79% ApacheConf 0.21%
minecraft mojang-api skin uuid rest-api

mc-rest-api's Introduction

MC-REST-API

Keep in mind that this project is in beta. So there could be breaking changes.

All issues should be reported.

ToDo

  • Website Documentation with live testing (Searching for help for this)
  • Name->UUID Basic feature
  • Cache it for ten minutes
  • Cache with configurable amount of time (and visible in the json format)
  • Persistent database (visible in the JSON format)
  • Configurable different source IPs sending the request to Mojang
  • Skin API
  • Avater API Skin/Head
  • Server Ping API (i.e. icon only)
  • SRV Resolve
  • Has paid API
  • Web stats
  • Name History API
  • Server Query API
  • Support for MCPE servers
  • Server version mapping
  • Plugin API
  • Buycraft API
  • Is up query
  • Multiple Name resolve requests
  • Wait some milliseconds to make concat some requests into a single one
  • Master-Slave support?
  • Random requests
  • UUID -> Name resolve
  • Validate input requests
  • Banner Generator (skin and head)
  • Votifier API
  • Blocked server query
  • Ban API
  • Legacy (Mojang like routes and responses)
  • Mojang Assets, Status API
  • Caching (and cache headers) for images
  • Configurable HTTP-Proxies
  • Unit test the request handling

Goals

  • Workaround rate-limiting by global caching and using http-proxies
  • Flexible API (if you have suggestions let us know)
  • Developer friendly, clear responses -> i.e. NOT returning a cracked player response if there is a issue with our servers
  • Open Source
  • Open for changes and suggestions
  • Simulate a Mojang API out of the box

Setup

  1. Clone this project
  2. Run composer install or as a developer composer install --dev
  3. Make a .env for local configuration
  4. Check the configuration settings
  5. Let your webserver point to the public directory
  6. Start the all the necessary servers (i.e. MySQL, memcache, redis, NGINX...)
  7. Setup the database structure: php artisan migrate

Development

Framework documentation: https://lumen.laravel.com/docs/5.2

Update model documentation

php artisan ide-helper:models yes

Update auto complete documentation for IDE

php artisan ide-helper:generate

Change the database schema (add or change table structure)

php artisan make:migration

Edit the file what should happen if the migration run (Up) and how it can be reverted (Down)

Credits

Some libraries are used or splitted into modules in order to keep the project simple. Here is the list of lib in use.

Recommendations

Routes

  • get('/uuid/{name}')

  • get('/hasPaid/{username}')

  • get('/name-history/{uuid}/all')

  • get('/name-history/{uuid}')

  • get('/name-history/{uuid}/{time}')

  • get('/properties/{uuid}')

  • get('/skin/{uuid}')

  • get('/avatar/{uuid}')

  • get('/domain/{domain}')

  • get('/ping/{domain}')

  • get('/ping/{domain}/players')

  • get('/ping/{domain}/icon')

  • get('/ping/{domain}/motd')

  • get('/ping/{domain}/player-count')

  • get('/stats')

mc-rest-api's People

Contributors

games647 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

celisold

mc-rest-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.