{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "method": "getTorrentsBrowse",
    "group": "Torrents",
    "summary": "Get the torrents browse page",
    "description": "Equivalent to getTorrents with an empty search.",
    "deprecated": true,
    "params": {
        "type": "object",
        "properties": {
            "key": {
                "description": "API key",
                "type": "string"
            },
            "results": {
                "$ref": "#/$defs/NumericInput",
                "default": 10
            },
            "offset": {
                "$ref": "#/$defs/NumericInput",
                "default": 0
            }
        },
        "required": [
            "key"
        ],
        "x-order": [
            "key",
            "results",
            "offset"
        ]
    },
    "result": {
        "type": "object",
        "properties": {
            "results": {
                "type": "string",
                "pattern": "^-?\\d+(\\.\\d+)?$"
            },
            "torrents": {
                "type": "object",
                "additionalProperties": {
                    "$ref": "#/$defs/Torrent"
                }
            }
        },
        "required": [
            "results"
        ],
        "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"
        }
    ],
    "examples": [],
    "x-deprecated-reason": "Use getTorrents instead.",
    "$defs": {
        "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+)?$"
                }
            ]
        },
        "Torrent": {
            "type": "object",
            "properties": {
                "GroupName": {
                    "type": "string"
                },
                "GroupID": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "TorrentID": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "SeriesID": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Series": {
                    "type": "string"
                },
                "SeriesBanner": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "SeriesPoster": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "YoutubeTrailer": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "Category": {
                    "enum": [
                        "Episode",
                        "Season"
                    ]
                },
                "Snatched": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Seeders": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Leechers": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Source": {
                    "type": "string"
                },
                "Container": {
                    "type": "string"
                },
                "Codec": {
                    "type": "string"
                },
                "Resolution": {
                    "type": "string"
                },
                "Origin": {
                    "type": "string"
                },
                "ReleaseName": {
                    "type": "string"
                },
                "Size": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Time": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "TvdbID": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "TvrageID": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "ImdbID": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "InfoHash": {
                    "type": "string"
                },
                "Tags": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "Genres": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "DownloadURL": {
                    "type": "string"
                }
            },
            "required": [
                "GroupName",
                "GroupID",
                "TorrentID",
                "SeriesID",
                "Series",
                "SeriesBanner",
                "SeriesPoster",
                "YoutubeTrailer",
                "Category",
                "Snatched",
                "Seeders",
                "Leechers",
                "Source",
                "Container",
                "Codec",
                "Resolution",
                "Origin",
                "ReleaseName",
                "Size",
                "Time",
                "TvdbID",
                "TvrageID",
                "ImdbID",
                "InfoHash",
                "Tags",
                "Genres",
                "DownloadURL"
            ],
            "additionalProperties": false
        }
    }
}
