total_number_of_results not returning the correct amount (Always one less)

Avatar image for neohoodman
Neohoodman

5

Forum Posts

39

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By Neohoodman

Whenever I query something with the following query

http://www.giantbomb.com/api/search/?api_key=XXX&format=json&resources=game&query="halo"

http://www.giantbomb.com/api/search/?api_key=XXX&format=json&resources=game&query="metal gear"

etc. It returns one less result.

For example: It says 30 results have returned, but counting and iterating only gives me 29 results. Counting by hand as well: I only count 29 results. This would make sense if I started counting at 0, but I start counting at 1.

If I search for a specific title (Say, Halo 5 with above query) I get 1 result and total_number = 1.

Avatar image for davidfox1983
davidfox1983

203

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Oddly this doesn't seem a consistent issue. For example, `http://www.giantbomb.com/api/search/?api_key=XXX&format=json&resources=game&query=uncharted` returns the correct result count...