TTWrite API: Thread Data

The Thread Data API suite provides endpoints for retrieving detailed thread data and loading replies to posts in a thread.


1. Fetch Thread Data

Endpoint URL

//ttwrite.4up.eu/mobile_api/thread_data

Description

This API retrieves the main post and its associated thread data, including replies to the post.

Parameters

FieldValueRemarks
thread_idintegerThe unique identifier of the thread to fetch.

Example Usage

codeGET //ttwrite.4up.eu/mobile_api/thread_data?thread_id=12345

Notes

  • The response includes:
    • post: The main post data of the thread.
    • next: An array of replies to the thread, each of which may include a replys variable containing nested replies.
  • Authentication is required to access this API.

2. Load Thread Replies

Endpoint URL

//ttwrite.4up.eu/mobile_api/thread_replys

Description

This API loads replies to a specific post within a thread, supporting nested replies for deeper discussions.

Parameters

FieldValueRemarks
post_idintegerThe unique identifier of the post whose replies are being fetched.
limitintegerOptional. Number of replies to return. Default is 20.
offsetintegerOptional. Pagination starting point for replies.

Example Usage

codeGET //ttwrite.4up.eu/mobile_api/thread_replys?post_id=67890&limit=10&offset=0

Notes

  • Each reply includes nested replies in the replys variable.
  • Use limit and offset to manage large sets of replies.

Notes for Both Endpoints

  • These endpoints provide a comprehensive way to explore thread data and facilitate discussions on posts.
  • Use thread_id for retrieving the main thread data and post_id for loading replies to specific posts.
  • Ensure valid IDs to avoid errors in fetching data.