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:
-
name
The name (usually in first name, given name format). -
race
The race of the minion. -
gender
Gender of the minion (currently it's either Male or Female). -
class
A D&D style class designation. -
social
Social 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. -
eyes
Eye color. -
hair
A sentence describing hair color and style worn by this minion. -
skin
Skin color. -
features
(optional) Distinguishing feature. -
appearance
A long form sentence describing minion's appearance (eye color, hair style, features, etc..) -
primary_weapon
Primary weapon used by this minion. -
weapon_type
Material from which the primary weapon is made from. -
secondary_weapon
(optional) Secondary weapon used by the minion (usually missile weapon). -
weapons
A long form sentence listing all of the minion's weapons. -
armor_category
The type of armor worn by the minion (leather, plate. etc..) -
armor_type
The material the minion's armor is made of. -
armor
The armor the minion is wearing.