Filtering by publisher

Avatar image for stuwest
stuwest

2

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

I've made a web application that selects a random Marvel or DC character. You can see it on the web by going to:

http://heromachine.stuwest.cloudbees.net/

As far as I can see from looking at the API documentation, there's no way to filter characters by publisher, so the way the application works is by making an API request like:

http://www.comicvine.com/api/characters/?api_key=[api_key]&format=json&limit=[x]&offset=[y]

Where [y] is a random integer between 1 and the total number of characters minus [x]. Having retrieved a group of results, my web app goes through them looking for a character whose publisher is either Marvel or DC as appropriate. I have it set to retrieve up to 200 results, since I'm 99.9% sure there will always be at least one Marvel or DC character in a group of characters that large.

Fine so far. My problem is that I've had a request for the app to include smaller publishers (Valiant, Dark Horse, Boom etc.) who probably account for a lot less than one out of every 200 characters. Is there a better way for me to approach this, or is it just not possible under the current setup?