Versions

  • v2

    10/23/2023
    Open: Version
    Changes from v1 to v2
    +6
    -3
    function valVersions({ token, id, offset, limit }: {
    token?: string;
    id: string;
    ⦚ 18 unchanged lines ⦚
    }
    : {};
    return @stevekrouse.fetchJSON(
    `https://api.val.town/v1/vals/${id}/versions?` +
    @stevekrouse.searchParams({
    offset: offset?.toString(),
    limit: limit?.toString(),
    ⦚ 4 unchanged lines ⦚
    import { searchParams } from "https://esm.town/v/stevekrouse/searchParams?v=9";
    import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";

    export function valVersions({ token, id, offset, limit }: {
    token?: string;
    id: string;
    ⦚ 18 unchanged lines ⦚
    }
    : {};
    return fetchJSON(
    `https://api.val.town/v1/vals/${id}/versions?` +
    searchParams({
    offset: offset?.toString(),
    limit: limit?.toString(),
    ⦚ 4 unchanged lines ⦚
  • v1

    8/21/2023
    Open: Version
    Changes from v0 to v1
    +11
    -4
    ⦚ 4 unchanged lines ⦚
    limit?: number;
    }): Promise<{
    val_id: string;
    version: 0;
    runStartAt: string;
    runEndAt: string;
    }> {
    const headers = token
    ⦚ 13 unchanged lines ⦚
    ⦚ 4 unchanged lines ⦚
    limit?: number;
    }): Promise<{
    data: {
    val_id: string;
    version: 0;
    runStartAt: string;
    runEndAt: string;
    }[];
    links: {
    self: string;
    next?: string;
    prev?: string;
    };
    }> {
    const headers = token
    ⦚ 13 unchanged lines ⦚
  • v0

    8/21/2023
    Open: Version
    +25
    -0

    function valVersions({ token, id, offset, limit }: {
    token?: string;
    id: string;
    offset?: number;
    limit?: number;
    }): Promise<{
    val_id: string;
    version: 0;
    runStartAt: string;
    runEndAt: string;
    }> {
    const headers = token
    ? {
    Authorization: `Bearer ${token}`,
    }
    : {};
    return @stevekrouse.fetchJSON(
    `https://api.val.town/v1/vals/${id}/versions?` +
    @stevekrouse.searchParams({
    offset: offset?.toString(),
    limit: limit?.toString(),
    }),
    { headers },
    );
    }
1
Next
Updated: October 23, 2023