{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "method": "getUserSubscriptions",
    "group": "User",
    "summary": "Get a user's forum subscriptions",
    "description": "Keyed by topic ID, in subscription order.",
    "deprecated": false,
    "params": {
        "type": "object",
        "properties": {
            "key": {
                "description": "API key",
                "type": "string"
            }
        },
        "required": [
            "key"
        ],
        "x-order": [
            "key"
        ]
    },
    "result": {
        "type": "object",
        "additionalProperties": {
            "$ref": "#/$defs/ForumSubscription"
        }
    },
    "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": {
        "ForumSubscription": {
            "type": "object",
            "properties": {
                "Title": {
                    "type": "string"
                },
                "Forum": {
                    "type": "string"
                },
                "ForumID": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Unread": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "NumPosts": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "NumViews": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "LastPost": {
                    "type": "object",
                    "properties": {
                        "Time": {
                            "type": "integer"
                        },
                        "AuthorID": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$"
                        },
                        "Username": {
                            "type": "string"
                        },
                        "ID": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$"
                        }
                    },
                    "required": [
                        "Time",
                        "AuthorID",
                        "Username",
                        "ID"
                    ],
                    "additionalProperties": false
                }
            },
            "required": [
                "Title",
                "Forum",
                "ForumID",
                "Unread",
                "NumPosts",
                "NumViews",
                "LastPost"
            ],
            "additionalProperties": false
        }
    }
}
