{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "method": "getForumsPage",
    "group": "Forums",
    "summary": "Get the threads in a forum",
    "description": "25 threads per page, stickies first, then most recent posts",
    "deprecated": false,
    "params": {
        "type": "object",
        "properties": {
            "key": {
                "description": "API key",
                "type": "string"
            },
            "ForumID": {
                "$ref": "#/$defs/NumericInput"
            },
            "Page": {
                "$ref": "#/$defs/NumericInput",
                "default": 1
            }
        },
        "required": [
            "key",
            "ForumID"
        ],
        "x-order": [
            "key",
            "ForumID",
            "Page"
        ]
    },
    "result": {
        "type": "object",
        "properties": {
            "ForumInfo": {
                "type": "object",
                "properties": {
                    "Name": {
                        "type": "string"
                    },
                    "Topics": {
                        "type": "string",
                        "pattern": "^-?\\d+(\\.\\d+)?$"
                    },
                    "GroupName": {
                        "type": "string"
                    },
                    "MinClassRead": {
                        "type": "string",
                        "pattern": "^-?\\d+(\\.\\d+)?$"
                    }
                },
                "required": [
                    "Name",
                    "Topics",
                    "GroupName",
                    "MinClassRead"
                ],
                "additionalProperties": false
            },
            "Threads": {
                "type": "array",
                "items": {
                    "$ref": "#/$defs/ForumThread"
                }
            },
            "MaxPages": {
                "type": "integer"
            }
        },
        "required": [
            "ForumInfo",
            "Threads",
            "MaxPages"
        ],
        "additionalProperties": false
    },
    "errors": [
        {
            "code": -32001,
            "message": "Invalid API Key"
        },
        {
            "code": -32002,
            "message": "Call Limit Exceeded"
        },
        {
            "code": -32003,
            "message": "User Account Disabled"
        },
        {
            "code": -32004,
            "message": "IP address needs authorization - please check your notices on BTN"
        },
        {
            "code": -32004,
            "message": "Unauthorized IP address"
        },
        {
            "code": 0,
            "message": "ERROR 400"
        },
        {
            "code": 0,
            "message": "error 404"
        },
        {
            "code": 0,
            "message": "Max Pages: {pageCount}"
        }
    ],
    "examples": [],
    "$defs": {
        "ForumThread": {
            "type": "object",
            "properties": {
                "ID": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Title": {
                    "type": "string"
                },
                "Author": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "IsSticky": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "IsLocked": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "LastPost": {
                    "type": "object",
                    "properties": {
                        "ID": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$"
                        },
                        "Time": {
                            "type": "integer"
                        },
                        "Author": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    "required": [
                        "ID",
                        "Time",
                        "Author"
                    ],
                    "additionalProperties": false
                }
            },
            "required": [
                "ID",
                "Title",
                "Author",
                "IsSticky",
                "IsLocked",
                "LastPost"
            ],
            "additionalProperties": false
        },
        "NumericInput": {
            "description": "A whole number, sent either as a JSON number or as a string containing one.\n`5` and `\"5\"` are equivalent, and both are accepted wherever this type appears.",
            "oneOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                }
            ]
        }
    }
}
