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:
-
nameThe name (usually in first name, given name format). -
raceThe race of the minion. -
genderGender of the minion (currently it's either Male or Female). -
classA D&D style class designation. -
socialSocial status (currently either Commoner or Noble). -
hate(optional) Something that this minion hates. -
fear(optional) Something that this minion fears. -
hates(optional) A long form sentence describing what the minion hates (eg. Hates Dwarfs.) -
fears(optional) A long form sentence describing what the minion fears (eg. Fears snakes.) -
traits(optional) A comma separated list of traits, culminated by a period. -
eyesEye color. -
hairA sentence describing hair color and style worn by this minion. -
skinSkin color. -
features(optional) Distinguishing feature. -
appearanceA long form sentence describing minion's appearance (eye color, hair style, features, etc..) -
primary_weaponPrimary weapon used by this minion. -
weapon_typeMaterial from which the primary weapon is made from. -
secondary_weapon(optional) Secondary weapon used by the minion (usually missile weapon). -
weaponsA long form sentence listing all of the minion's weapons. -
armor_categoryThe type of armor worn by the minion (leather, plate. etc..) -
armor_typeThe material the minion's armor is made of. -
armorThe armor the minion is wearing.