davidchambers / tutor

JavaScript interface for the Gatherer card database
https://gatherer.wizards.com/
Do What The F*ck You Want To Public License
149 stars 18 forks source link

Total pages not correct when there are more than 10 pages #47

Closed pgrosslicht closed 11 years ago

pgrosslicht commented 11 years ago

For example the set "Limited Edition Alpha" has 12 pages in total. If I get the set cards at page 1 it returns

{
    page: 1,
    pages: 10
}

on the second page:

{
    page: 2,
    pages: 11
}

and on the third page finally the correct count:

{
    page: 3,
    pages: 12
}

Thanks for this great API, really unfortunate that Wizards doesn't provide one itself...

davidchambers commented 11 years ago

Thanks for the bug report, @pdgwien. The problem was that non-numeric pagination links (> and >>) were being ignored. The logic is now simpler: we determine the page number for each pagination link, then choose the largest.