Skip to content

Additional information on "older_than_token" for item based endpoints #1

@Peter200lx

Description

@Peter200lx

older_than_token:
type: string
description: >-
The older_than_token string's structure is still unknown to
me. It's being used to page through results. The first part of
it seems to be some kind of timestamp. Starting with the
current time you'd get the last token of the result set, which
in turn could be used to fetch more results.
example: '1504691191:1603563167:a::'

This is merely discoveries from analysis of API responses on my own collection.
The older_than_token is broken up into 5 parts separated by :
Example partial response from api/fancollection/1/collection_items {"items": [{:

            "tralbum_type": "a",
            "purchased": "06 Feb 2017 02:16:28 GMT",
            "tralbum_id": 3314754897,
            "token": "1486347388:3314754897:a:2:",

Here's my understanding of the 5 parts:

  1. Unix epoch timestamp of when fan "purchased" this item.
  2. "tralbum_id" of the item in question
  3. "trablum_type" of the item in question
  4. Monotonically increasing index of items past initial set on users fan page (index can jump values)
  5. ?Unused?

Specifically related to api/fancollection/1/collection_items:

  1. The timestamp and id are not necessary and can be left blank ::...
  2. The tralbum_type is required to not be empty, but any value is fine ::foo:...
  3. The index value is the only important part for this handler
    3.1. Any index value that is not a positive whole number is ignored and treated as an empty value, aka start at the first value you can give. (::foo:: or ::foo:bar: says start with the first item, ::foo:50: says start with the 51st item)
    3.2. This unfortunately means you can't get the extended information about the initial 45 items set on the users fan page (apart from something like automating swapping the first and section 45 item chunks)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions