Web API: "publish_" dates do not match up with website

Avatar image for cbanack
cbanack

124

Forum Posts

199

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

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:

<publish_day/><publish_month/><publish_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!

<publish_day>27</publish_day><publish_month>5</publish_month><publish_year>2013</publish_year>

---------------------------

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
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#2 porkbun  Staff

@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
pikahyper

19027

Forum Posts

37057995

Wiki Points

0

Followers

Reviews: 5

User Lists: 581

#3 pikahyper  Moderator

@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
cbanack

124

Forum Posts

199

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#4  Edited By cbanack

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

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#5 porkbun  Staff

@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.

Ex:

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
cbanack

124

Forum Posts

199

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@frobie: that is awesome!! Thanks!

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