{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "method": "getForumsIndex",
    "group": "Forums",
    "summary": "Get the forum index",
    "description": "Keyed by forum *group* name, i.e. \"Site\", \"TV\", \"Community\".\n\nPassing `lastPost: false` replaces the post details with an empty string in the `LastPost` field.",
    "deprecated": false,
    "params": {
        "type": "object",
        "properties": {
            "key": {
                "description": "API key",
                "type": "string"
            },
            "lastPost": {
                "type": "boolean",
                "default": true
            }
        },
        "required": [
            "key"
        ],
        "x-order": [
            "key",
            "lastPost"
        ]
    },
    "result": {
        "type": "object",
        "additionalProperties": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/Forum"
            }
        }
    },
    "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"
        }
    ],
    "examples": [],
    "$defs": {
        "Forum": {
            "type": "object",
            "properties": {
                "ForumName": {
                    "type": "string"
                },
                "Description": {
                    "type": "string"
                },
                "Sort": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "ForumID": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "NumTopics": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "NumPosts": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "LastPost": {
                    "oneOf": [
                        {
                            "const": ""
                        },
                        {
                            "type": "object",
                            "properties": {
                                "ID": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$"
                                },
                                "Title": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "UserID": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$"
                                },
                                "Username": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "TopicID": {
                                    "type": "string",
                                    "pattern": "^-?\\d+(\\.\\d+)?$"
                                },
                                "Time": {
                                    "type": "integer"
                                }
                            },
                            "required": [
                                "ID",
                                "Title",
                                "UserID",
                                "Username",
                                "TopicID",
                                "Time"
                            ],
                            "additionalProperties": false
                        }
                    ]
                }
            },
            "required": [
                "ForumName",
                "Description",
                "Sort",
                "ForumID",
                "NumTopics",
                "NumPosts",
                "LastPost"
            ],
            "additionalProperties": false
        }
    }
}
