Add randomizer to index query. Limit to one result. Note: this is still an array, even though there's only one result. This makes it easy to scale in case we want say 5 or more random results later.
Add is_male filter to index query. true is male, false is female.
Endpoint is now consumed like so:
GET /names Any random name from the database, regardless of male/female.
is_male
filter to index query.true
is male,false
is female.Endpoint is now consumed like so:
GET /names
Any random name from the database, regardless of male/female.GET /names?is_male=true
Random male name.GET /names?is_male=false
Random female name.