Skip to content

Instantly share code, notes, and snippets.

@charlag
Created October 12, 2018 16:37
Show Gist options
  • Save charlag/3d13c6b0df85286f9ce5d63c95ad10e7 to your computer and use it in GitHub Desktop.
Save charlag/3d13c6b0df85286f9ce5d63c95ad10e7 to your computer and use it in GitHub Desktop.
UUUUUUGH
Let's say this is a top of my timeline:
"100883628340642811",
"100883628339152625",
"100883628129621553",
"100883627886489576",
"100883626425518196",
"100883626407487034",
"100883626392971820",
"100883626164206546",
"100883626060797703",
"100883624885745415",
"100883621804880919",
"100883621698582126",
"100883618984466056"
I want to get statuses up & including 100883628339152625 (second one)
I ask server for the status (one or two or ten) ids older, like since_id=100883628339152623
I get
[
"100883628340642811"
]
Why? I know 100883628339152623 is *not* in my timeline but whatever, 100883628339152625 > 100883628339152623
As far as I understand the server code this does very dumb filtering, then why it should work like that?
@Gargron
Copy link

Gargron commented Oct 12, 2018

max_id: Posts with ID lower than the given ID (i.e. older than ID). When to use: Paginating into the past

since_id: Newest posts cut off if it reaches the given ID. So if there are 40 new posts, you will get 20 newest ones, and there will be a 20 post gap. When to use: Checking for updates

min_id: Posts with ID greater than the given ID, immediately after the given ID. So if there are 40 new posts, you will get the 20 posts that immediately followed the previous ones, and not the 20 newest ones. When to use: Paginating into the future. Added in: 2.6.0 (unreleased)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment