I'm running into an issue when attempting to use a filter with spaces. Say I'm looking for The Amazing Spider-Man #700.
I have no problem getting all comics #700:
http://www.comicvine.com/api/issues/?api_key=<api_key>&filter=issue_number:700
But when I attempt to add to the filter, things go wrong:
http://www.comicvine.com/api/issues/?api_key=<api_key>&filter=issue_number:700,name:The_Amazing_Spider-Man (Returns Nothing Useful)
http://www.comicvine.com/api/issues/?api_key=<api_key>&filter=issue_number:700,name:The%20Amazing%20Spider-Man (Returns Nothing Useful)
http://www.comicvine.com/api/issues/?api_key=<api_key>&filter=issue_number:700,name:"The Amazing Spider-Man" (Returns Nothing Useful)
http://www.comicvine.com/api/issues/?api_key=<api_key>&filter=issue_number:700,name:'The Amazing Spider-Man' (Returns Nothing Useful)
If I rely on wild cards, I can find the specific issue, but this isn't ideal - there could be multiple comics matching Issue #2, with a name containing Man.
http://www.comicvine.com/api/issues/?api_key=<api_key>&filter=issue_number:700,name:Spider
So it comes down to this: what is the proper way to include spaces in a filter?
EDIT: So I think I found my mistake... The "name" the API is referencing is the Issue -> name, not the Issue -> Volume -> Name. In this case, the reason why the wild card works is because the issue -> name for ASM 700 is "Dying Wish: Suicide Run; Spider-Dreams; Date Night".
Let's change my question then. Is it possible to filter Issues based on volume name?
EDIT2: So I think I figured this out, and for any other newbies to API scripting - here's what has to be done:
You first have to query http://www.comicvine.com/api/volumes/?api_key=<api_key>&filter=name:The Amazing Spider-Man, then parse the results, pulling out an array (or whatever) of Volume IDs.
You can then plug that into the issues query:
http://www.comicvine.com/api/issues/?api_key=<api_key>&filter=issue_number:700,volume:<volume ID>
That will return a list of all comics that match the volume and issue number.
Log in to comment