Versions

  • v32

    8/6/2023
    Open: Version
    Changes from v31 to v32
    +1
    -0
    export const lichessTV = (async () => {
    const { Chess } = await import("npm:chess.js");
    const channels = await fetch("https://lichess.org/api/tv/channels");
    const games = await channels.json();
    const rapidGame = games["Rapid"];
    const game = await fetch(
    `https://lichess.org/game/export/${rapidGame.gameId}`,
    ⦚ 12 unchanged lines ⦚
    export const lichessTV = (async () => {
    const { Chess } = await import("npm:chess.js");
    const channels = await fetch("https://lichess.org/api/tv/channels");
    const games = await channels.json();
    console.log(games);
    const rapidGame = games["Rapid"];
    const game = await fetch(
    `https://lichess.org/game/export/${rapidGame.gameId}`,
    ⦚ 12 unchanged lines ⦚
  • v31

    8/6/2023
    Open: Version
    Changes from v30 to v31
    +5
    -2
    export const lichessTV = (async () => {
    const channels = await fetch("https://lichess.org/api/tv/channels");
    const games = await channels.json();
    const rapidGame = games["Rapid"];
    ⦚ 7 unchanged lines ⦚
    },
    );
    const fullPgn = await game.text();
    return fullPgn.trim().split("\n").at(-1);
    })();
    export const lichessTV = (async () => {
    const { Chess } = await import("npm:chess.js");
    const channels = await fetch("https://lichess.org/api/tv/channels");
    const games = await channels.json();
    const rapidGame = games["Rapid"];
    ⦚ 7 unchanged lines ⦚
    },
    );
    const pgn = await game.text();
    const chess = new Chess();
    chess.loadPgn(pgn);
    return chess.ascii();
    })();
  • v30

    8/6/2023
    Open: Version
    Changes from v29 to v30
    +1
    -1
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    return fullPgn.trim().split("\n");
    })();
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    return fullPgn.trim().split("\n").at(-1);
    })();
  • v29

    8/6/2023
    Open: Version
    Changes from v28 to v29
    +1
    -1
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    return fullPgn.split("\n");
    })();
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    return fullPgn.trim().split("\n");
    })();
  • v28

    8/6/2023
    Open: Version
    Changes from v27 to v28
    +1
    -2
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    const pgn = fullPgn.split("\n").slice(-3);
    return pgn;
    })();
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    return fullPgn.split("\n");
    })();
  • v27

    8/6/2023
    Open: Version
    Changes from v26 to v27
    +1
    -1
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    const pgn = fullPgn.split("\n").slice(-2);
    return pgn;
    })();
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    const pgn = fullPgn.split("\n").slice(-3);
    return pgn;
    })();
  • v26

    8/6/2023
    Open: Version
    Changes from v25 to v26
    +1
    -1
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    const pgn = fullPgn.split("\n").slice(-1);
    return pgn;
    })();
    ⦚ 12 unchanged lines ⦚
    );
    const fullPgn = await game.text();
    const pgn = fullPgn.split("\n").slice(-2);
    return pgn;
    })();
  • v25

    8/6/2023
    Open: Version
    Changes from v24 to v25
    +1
    -0
    ⦚ 13 unchanged lines ⦚
    const fullPgn = await game.text();
    const pgn = fullPgn.split("\n").slice(-1);
    })();
    ⦚ 13 unchanged lines ⦚
    const fullPgn = await game.text();
    const pgn = fullPgn.split("\n").slice(-1);
    return pgn;
    })();
  • v24

    8/6/2023
    Open: Version
    +16
    -0

    export const lichessTV = (async () => {
    const channels = await fetch("https://lichess.org/api/tv/channels");
    const games = await channels.json();
    const rapidGame = games["Rapid"];
    const game = await fetch(
    `https://lichess.org/game/export/${rapidGame.gameId}`,
    {
    headers: {
    // Doesn't seem to return json
    "content-type": "application/json",
    },
    },
    );
    const fullPgn = await game.text();
    const pgn = fullPgn.split("\n").slice(-1);
    })();
Updated: October 23, 2023