Skip to main content
9 events
when toggle format what by license comment
Nov 16, 2021 at 3:58 comment added 0Valt @Enlico the number 30 as well as how the paging works is explained in the API docs. P.S. I would go for recursively fetching the pages with a breaking condition of has_more being set to false - there is no need to pre-count the number of pages.
Nov 14, 2021 at 14:55 history edited rene CC BY-SA 4.0
added 3 characters in body
Nov 14, 2021 at 14:31 comment added Enlico Ok, page_size seems to contain that info, so Math.ceil(total/page_size) tells me the pages I need to fetch.
Nov 14, 2021 at 14:30 comment added Enlico (cont.d) In my case it looks like it's 30, but where does this number come from?
Nov 14, 2021 at 14:30 comment added Enlico Also, as regards the last paragraph, I see that for a request of mine it shows "total":440, however page 15 is the last one to have a non-empty "items" field. I have verified that indeed each page has 30 items and the last just 20, so 14*30+20=440. For that total to be useful to know upfront how many pages I have to fetch, I need to know how many entries are in each page.
Nov 14, 2021 at 14:16 comment added Enlico Yes!!! I knew there was another easier way, thanks! And yes, I got misguided by the top: when I show those entries have the top- part, I didn't even look at them; even the description is misleading, I think, e.g. Get the top tags (by score) a single user has posted in. However, I've not really understood the part "The user I used [...] Close enough I would say". What inaccuracy are you referring to? What is 440 and what 40?
Nov 14, 2021 at 13:28 history edited rene CC BY-SA 4.0
added 76 characters in body
Nov 14, 2021 at 13:16 history edited rene CC BY-SA 4.0
added 73 characters in body
Nov 14, 2021 at 13:07 history answered rene CC BY-SA 4.0