mozilla/badgekit-api — pull request #127 by christensenep (2014-09-18 18:18:18+00:00)
Title: Add bulk issuing route

This adds a POST route at (for example) `/systems/{system}/badges/{badge}/instances/bulk` that allows API users to issue a given badge to a number of users at once, without having to make a POST for each email.

I opted to use a different route (with the `/bulk` suffix) rather than allowing the original POST route to simply allow for "email" to be an array rather than a single email. There are enough differences with the way the bulk issuing behaves that I thought it was odd for them to share the same route. Namely:

* Bulk issuing does not allow for claim code usage
* Bulk issuing does not throw an error if a user already has a badge. When finished, it returns an array of instances created. If one of the emails provided already had a badge, that email will therefore be absent from the list of instances created (or, if the email was entered twice, as is very, very frequently the case, only one corresponding instance will be created and returned).