{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "method": "getUserSnatchlist",
    "group": "User",
    "summary": "Get a user's HnR list",
    "description": "`torrents` is keyed by torrent ID\n\n`Ratio` is a preformatted string, including the sentinels `--` for no activity\nand `-0.00` for download with no upload.\n\n`SnatchTime` is a `DATETIME` string, `YYYY-MM-DD HH:MM:SS`, in server local time.\nNote that most other timestamps on this surface are epoch seconds, so this one\nneeds a different parser. It carries no timezone and uses a space separator, so it\nis not RFC 3339 and a strict date-time parser will reject it.",
    "deprecated": false,
    "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": {
            "torrents": {
                "type": "object",
                "additionalProperties": {
                    "$ref": "#/$defs/SnatchlistEntry"
                }
            },
            "results": {
                "type": "string",
                "pattern": "^-?\\d+(\\.\\d+)?$"
            }
        },
        "required": [
            "torrents",
            "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": [],
    "$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+)?$"
                }
            ]
        },
        "SnatchlistEntry": {
            "type": "object",
            "properties": {
                "TorrentID": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Downloaded": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Uploaded": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Ratio": {
                    "type": "string"
                },
                "Seedtime": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "IsSeeding": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "SnatchTime": {
                    "type": "string"
                },
                "TorrentInfo": {
                    "type": "object",
                    "properties": {
                        "GroupName": {
                            "type": "string"
                        },
                        "Series": {
                            "type": "string"
                        },
                        "Year": {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$"
                        },
                        "Source": {
                            "type": "string"
                        },
                        "Container": {
                            "type": "string"
                        },
                        "Codec": {
                            "type": "string"
                        },
                        "Resolution": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "GroupName",
                        "Series",
                        "Year",
                        "Source",
                        "Container",
                        "Codec",
                        "Resolution"
                    ],
                    "additionalProperties": false
                }
            },
            "required": [
                "TorrentID",
                "Downloaded",
                "Uploaded",
                "Ratio",
                "Seedtime",
                "IsSeeding",
                "SnatchTime",
                "TorrentInfo"
            ],
            "additionalProperties": false
        }
    }
}
