© Luke Maciak

Minion Academy

Minions as a web service.

You can now use minion.academy as a web service which returns a valid JSON object that can be parsed and consumed by your application.

Usage

To fetch a single randomly generated minion wrapped in a JSON object simply access the following url:

http://minion.academy/json/1

This will return a JSON object formated like this:

{
  "1": { 
    "name":"Imirrien the Nightarrow",
    "race":"Elf",
    "gender":"Female",
    "class":"Rogue",
    "social":"Commoner",
    "hate":"Dwarfs",
    "fear":"",
    "hates":"Hates Dwarfs.",
    "fears":"",
    "traits":"Stalwart.",
    "eyes":"blue",
    "hair":"short braids, white",
    "skin":"fair",
    "features":"",
    "appearance":"Blue eyes, fair skin.  Hair: short braids, white.",
    "primary_weapon":"Axe",
    "weapon_type":"bronze",
    "secondary_weapon":"",
    "weapons":"Weapons: Axe.",
    "armor_category":"Leather",
    "armor_type":"",
    "armor":"studded leather armor"
    }
}

If you need more minions, simply put the desired number in the URL. For example, to fetch 6 minions use http://minion.academy/6 . Currently this service allows you to generate between 1 and 50 minions per request. If you request more than 50 minions, the results will be capped at the max request size. The resulting JSON array is 1-indexed (first element is numbered 1). Some fields are optional and will be returned as empty strings so you should always check for that.

Ruby Example

To use minion.academy in a Ruby project:

require 'open-uri'
require 'json'

minions = JSON.parse(open("http://minion.academy/json/2").read)
puts minions['1']['name']
puts minions['2']['name']

Reference

The JSON object will include the following fields: