Avatar image for cbanack
#1 Posted by cbanack (118 posts) - - Show Bio

I've noticed a problem with the web API since the new website format went live. In the "issue" resource, the "publish_day", "publish_month" and "publish_year" values do not always match up with what I see on the website. There are two distinct examples (which may stop exhibiting the problem if someone ever changes the "In Store Date" or the "Cover Date" for either of them):

This comic contains no Cover Date, but it does have an In Store Date of March 23, 2013. However, when you access it with the web API, you get nothing for the published_day/month/year:


Other comics that do have a Cover Date seem to report the In Store Date in these fields as they should.

An even stranger example occurs with this comic, where we have a Cover Date of May 2013, and an In Store Date of March 27, 2013, yet the web API reports a mixture of the two dates!



On a related note, it would be really nice if the web API offered an addition "cover_year" and "cover_month" field so that API users could access both dates!

Avatar image for porkbun
#2 Posted by PorkBun (60 posts) - - Show Bio

@cbanack We will be moving away from the individual publish fields and replacing them with a store_date and cover_date in the format of YYYY-MM-DD. Having these as individual fields makes sorting and filtering by them more difficult than it needs to be.

Avatar image for pikahyper
#3 Posted by pikahyper (16590 posts) - - Show Bio

@cbanack: the site uses some auto dates when fields are empty so that could be causing some of the problems, as for adding the new API fields that will probably happen eventually, they just created the second date feature so it makes sense that it isn't in the API yet.

Avatar image for cbanack
#4 Edited by cbanack (118 posts) - - Show Bio

@frobie that sounds great, I'm looking forward to it. :)

Avatar image for porkbun
#5 Posted by PorkBun (60 posts) - - Show Bio

@cbanack: The change has been made and is now live. The publish_* fields have been removed; cover_date and store_date fields have been added. The two fields are available for sorting.

To filter for the cover_date or store_date, one date is an exact match while two dates separated by a pipe is a range match.


To get issues released in store on Feb 25, 2013:

http://api.comicvine.com/issues/?api_key=[API KEY]&filter=store_date:2013-02-25

To get issues with a cover date of April 2013:

http://api.comicvine.com/issues/?api_key=[API KEY]&filter=cover_date:2013-04-01|2013-04-30

Avatar image for cbanack
#6 Posted by cbanack (118 posts) - - Show Bio

@frobie: that is awesome!! Thanks!

(since you are fixing bugs today, here's another (probably easy) one.)