kutt - v4.0.0
    Preparing search index...

    Function getKuttLinkStatsV2

    • Gets a short link's visit statistics using the Kutt v2 API.

      Parameters

      • linkId: string

        The link's unique ID.

      • options: TAPIOptions = {}

        Per-request base URL, API key, and timeout in milliseconds. Omitted settings use KUTT_CONFIG.

      Returns Promise<TLinkStatsV2>

      The link and its daily, weekly, monthly, and yearly statistics with normalized dates.

      HTTPError If the API returns an unsuccessful HTTP response.

      If the request fails, times out, or the response cannot be decoded.

      import { getKuttLinkStatsV2 } from "kutt";

      const stats = await getKuttLinkStatsV2(
      "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      { apiKey: "YOUR_API_KEY" },
      );
      console.log(stats.lastDay.views);