Giter Club home page Giter Club logo

api.wurstmineberg.de's Introduction

Note: This repository only hosts versions 1 and 2 of the API, which are no longer operational. Version 3 can be found at https://github.com/wurstmineberg/wurstmineberg.de/blob/master/wurstmineberg_web/api.py.

This is Wurstmineberg's Minecraft API, an API server using bottle.py that exposes Minecraft server data via JSON. It is not to be confused with Minecraft's official API which is currently in development.

It can be found live on http://api.wurstmineberg.de/.

This is version 2.5.0 of the API (semver). A list of available endpoints along with brief documentation can be found on its index page.

Requirements

Configuration

If you are using nginx, you can for the most part follow this guide. Just use api.py instead of writing your own app.py as in the guide, and make sure to install uwsgi-plugin-python3 and python3-bottle instead of their Python 2 counterparts.

If you're using the Apache httpd or another web server, you're on your own for setting up the API.

Some endpoints use logs generated by wurstminebot. If you don't run a wurstminebot on your server, you will have to provide logs in a compatible format in order to use these endpoints.

You can provide a configuration file in /opt/wurstmineberg/config/api.json to customize some behavior. Here are the default values:

{
    "cache": "/opt/wurstmineberg/api-cache",
    "host": "wurstmineberg.de",
    "jlogPath": "/opt/wurstmineberg/jlog",
    "logPath": "/opt/wurstmineberg/log",
    "moneysFile": "/opt/wurstmineberg/moneys/moneys.json",
    "webAssets": "/opt/git/github.com/wurstmineberg/assets.wurstmineberg.de/master",
    "worldHost": "wurstmineberg.de"
}

api.wurstmineberg.de's People

Contributors

fenhl avatar jemus42 avatar ralokt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

xlrdx fenhl

api.wurstmineberg.de's Issues

chunk data access

There should be a way to access chunk data through the API. Ideally after 2.0 for multiworld support.

Move Death Games endpoint

The endpoint is /deathgames/log.json, but it should be /minigame/deathgames/log.json. Since this is a backwards-incompatible API change, it would require a major version bump.

Allow fallback to Minecraft nicks when people.json is missing

Some endpoints currently fail when people.json cannot be loaded, even though their basic functionality could easily be made available without it.

Fox example, /server/deaths/latest.json works fine as long as there is something that creates the deaths log, even if no people file is present.

These endpoints should fall back to using Minecraft nicknames or UUIDs instead of erroring.

minecraftlib

Separate the backend that reads the data into its own Python module (called minecraftlib), so that it can also be used by wurstminebot for features like !Weather.

playerstats/item.json contains "stat.drop"

The /server/playerstats/item.json contains a rogue stat named stat.drop. IIRC, this would be the summary statistic for the drop.$item stats and should be included in /server/playerstats/general.json and does not need to be in the items endpoint.

Player skin endpoints

Effectively an on-demand replacement for playerhead, providing endpoints for both head-only and front-view skin images at different sizes.

Actually using playerhead to generate the images is probably the easiest implementation.

Add file extensions to endpoints

The following endpoints are missing file extensions:

  • /minecraft/items/by-damage/:item_id/:item_damage
  • /minecraft/items/by-id/:item_id
  • /server/maps/by-id/:identifier
  • /server/playerdata/by-id/:identifier
  • /server/playerstats/by-id/:identifier

/server/playernames.json not listing players with a player data file

The /server/playernames.json is supposed to list the Minecraft nicknames of everyone on the whitelist, as well as everyone with a player data file in the world directory. For Minecraft 1.7.6 and higher, the location of these files has moved, and the endpoint fails to include the player data files in the response.

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.