Skip to content

Capitalisation of declineReasonKey values #485

@GameRoMan

Description

@GameRoMan

declineReasonKey in ChallengeDeclinedJson are camel-cased, but in actual api-response they are not

Either api returns it in incorrect casing or I I've done it in incorrect casing in the docs

{
    "type": "challengeDeclined",
    "challenge": {
        "id": "iVBqQYx7",
        "url": "https://lichess.org/iVBqQYx7",
        "status": "declined",
        "challenger": {
            "id": "anishchenko_roman",
            "name": "Anishchenko_Roman",
            "rating": 1311,
            "title": None,
            "provisional": True,
            "flair": "people.brain",
            "online": True,
            "lag": 4,
        },
        "destUser": {
            "id": "gameromanbot",
            "name": "GameRoManBot",
            "rating": 1500,
            "title": "BOT",
            "provisional": True,
            "flair": "smileys.robot",
            "online": True,
        },
        "variant": {"key": "standard", "name": "Standard", "short": "Std"},
        "rated": False,
        "speed": "ultraBullet",
        "timeControl": {"type": "clock", "limit": 15, "increment": 0, "show": "¼+0"},
        "color": "random",
        "finalColor": "black",
        "perf": {"icon": "\ue059", "name": "UltraBullet"},
        "declineReason": "This time control is too fast for me, please challenge again with a slower game.",
        "declineReasonKey": "toofast",
    },
}

declineReasonKey:
type: string
description: Untranslated, computer-matchable reason why the challenge was declined.
enum:
- generic
- later
- tooFast
- tooSlow
- timeControl
- rated
- casual
- standard
- variant
- noBot
- onlyBot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions