Skip to content

Latest commit

 

History

History
122 lines (80 loc) · 6.9 KB

README.md

File metadata and controls

122 lines (80 loc) · 6.9 KB

eve-shields

This is a small web service that allows the creation of EVE online related dynamic shields that can be used on web sites or github pages. Like the ones below that show stats for this github repo and the eve-shields service.

Repo license Python Build Uptime Robot status Uptime Robot ratio

Shields

Here is an overview of all shields this service can generate for you:

Name Description Category Example
activePvpChars Active PVP characters in the last 7 days zkb-stats activePvpChars
corpCount Count of member corporations zkb-stats corpCount
dangerRatio Danger classification by zKillboard
snuggly: green, dangerous: red
zkb-stats dangerRatio
iskDestroyed Total ISK destroyed zkb-stats iskDestroyed
iskLost Total ISK lost zkb-stats iskLost
iskEff Total ISK efficiency in %
eff = destroyed / (destroyed + lost) * 100
eff >= 50: green, eff < 50: red
zkb-stats iskEff
memberCount Count of member characters zkb-stats memberCount
shipsDestroyed Total ships destroyed zkb-stats shipsDestroyed
shipsLost Total ships lost zkb-stats shipsLost
shipsEff Total ships efficiency in %
= destroyed / (destroyed + lost) * 100
eff >= 50: green, eff < 50: red
zkb-stats shipsEff

All examples on this page are generated live with data from zKillboard statistics for Test Alliance Please Ignore. Here is the URL to create the example memberCount shield:

https://img.shields.io/endpoint?url=https://eve-shields.kalkoken.net/zkb-stats/alliance/498125261/memberCount

If you need additional shields with data generated from zKillboard statistics feel free to raise an issue.

How it works

The shield are created by a service called shields.io, which is providing many different shields for people to use. They also provide an API for dynamically creating shields with custom input from an endpoint.

eve-shields functions as such an endpoint and provides all data in the required format to shields.io for creating Eve Online related shields. Data is dynamically loaded from APIs like zKillboard API as needed.

How to use it

I am hosting this service on a server and you are free to use it directly for your website or github pages. (see section Service for details)

Or you can install and run it on your own web server. There are many ways, but I recommend using PyInstaller, which is the easiest. You will need a web server (e.g. NGINX) and a WSGI server (e.g Gunicorn) to run it.

pip install git+https://github.com/ErikKalkoken/eve-shields

Note that if you run it yourself you need to have SSL, because shields.io only accepts https links as endpoint.

Syntax

To create your own shield use the JSON endpoint URL from shield.io and add the endpoint URL from eve-shields for the url parameter.

Here is a complete example url for creating a members count shield for Test Alliance Please Ignore:

https://img.shields.io/endpoint?url=https://eve-shields.kalkoken.net/zkb-stats/alliance/498125261/memberCount

Let's break this down in its two parts: shields.io and eve-shields.

shields.io

The syntax for shields.io JSON endpoint is:

https://img.shields.io/endpoint?url={url-eve-shields}&style=...

eve-shields

The basic syntax for the eve shields endpoint url is:

https://eve-shields.kalkoken.net/{source}/...

source is the name of the data source used to create shields. Currently the only implemented source is zkb-stats.

Note that you still can add query parameters from shields.io to customize your shield, e.g. if you want to override the color (color) or label (label) generated by eve-shield.

Source: zkb-stats

zkb-stats provides zKillboard statistics for EVE entities. See here for details on the API. Please note though that only a sub set is currently implemented.

syntax

The syntax for zkb-stats shields is as follows:

https://eve-shields.kalkoken.net/zkb-stats/{entity-type}/{entity-id}/{shield-name}
  • entity-type: name of the EVE entity type. The following types are supported:
    • alliance
    • character
    • corporation
    • faction
    • region
    • shipGroup
    • shipType
    • solarSystem
  • entity-id: a valid EVE ID corresponding to the entity type, e.g. 498125261 for Test Alliance Please Ignore.
  • shield-name: name of the shield to create. Note that not all shields are available for every entity type, e.g. there is no member count for ships. See section Shields for a list of all shield names.

Service

The eve-shields service on https://eve-shields.kalkoken.net is provided for free and can be used by anyone to create their own eve related shields. And while I strive to provide a reliable service it is provided "as-is" only and without any guarantees with respect to availability and reliably.

For the current service status check the shields on top of this page. A detailed service status report can be found here.

Contributions

Help and contributions are welcome.

Credits

Special thanks to the guys at shields.io for their great service and to @cvweiss for running zKillboard and providing all those nice APIs along with it.