Skip to content
This repository was archived by the owner on Aug 6, 2022. It is now read-only.

III.2.b. Threads

Andrey Bogdanov edited this page Feb 25, 2016 · 5 revisions

Contents

Requests

Get a page
/<boardName>/<pageNumber>.json

Returns the board page.

Note: page numbers begin from 0.

Example:

/b/0.json

{
    "threads": [
        { "this is a thread": "it is not included to save the page space" },
        ...
    ],
    "pageCount": 9,
    "currentPage": 0,
    "lastPostNumber": 29556,
    "postingSpeed": "post(s) per hour."
}

On an internal error, an error object is returned. If the board or the page specified is not found, a 404 page is returned along with the 404 status code.

Get a thread
/<boardName>/res/<threadNumber>.json

Returns the thread.

Example

/b/res/1.json

{
    "thread": {
        "title": "First thread",
        "number": 1,
        "bumpLimit": 500,
        "postLimit": 1000,
        "bumpLimitReached": true,
        "postLimitReached": false,
        "closed": false,
        "fixed": false,
        "postCount": 548,
        "postingEnabled": true,
        "opPost": { "this is a post": "it is not included to save the page space" },
        "posts": [
            { "this is a post": "it is not included to save the page space" },
            ...
        ]
    },
    "lastPostNumber": 29548
}

On an internal error, an error object is returned. If the board or the thread specified is not found, a 404 page is returned along with the 404 status code.

Get a board catalog
/<boardName>/catalog.json

Returns the catalog.

Example:

/b/catalog.json

{
    "threads": [
        { "this is a thread": "it is not included to save the page space" },
        ...
    ],
    "lastPostNumber": 29556,
    "postingSpeed": "post(s) per hour."
}

On an internal error, an error object is returned. If the board is not found, a 404 page is returned along with the 404 status code.

Get a board archive
/<boardName>/archive.json

Returns the catalog.

Example:

/b/archive.json

{
    "threads": [
        { "this is a thread": "it is not included to save the page space" },
        ...
    ],
    "lastPostNumber": 29556,
    "postingSpeed": "post(s) per hour."
}

On an internal error, an error object is returned. If the board is not found, a 404 page is returned along with the 404 status code.

Get thread information
/api/threadInfo.json?boardName=<boardName>&threadNumber=<threadNumber>

Returns information about a thread without posts.

Example:

/api/threadInfo.json?boardName=b&threadNumber=1

{
    "number": 1,
    "bumpLimit": 500,
    "postLimit": 1000,
    "bumpLimitReached": true,
    "postLimitReached": false,
    "closed": false,
    "fixed": false,
    "postCount": 548,
    "postingEnabled": true
}

On any error, an error object is returned.

Example:

/api/threadInfo.json?boardName=b&threadNumber=100500

{
    "title": "Error",
    "errorMessage": "Error",
    "errorDescription": "No such thread"
}

Clone this wiki locally