@squidcloud/client
    Preparing search index...

    Class WebClient

    WebClient provides methods to interact with web-related functionalities.

    Index

    Methods

    • Search the web using AI. Returns a response containing Markdown text and cited URLs.

      Parameters

      • query: string

        The keywords or query string to search for.

      Returns Promise<WebAiSearchResponse>

    • Creates a shortened URL for the given URL.

      Defaults to a 1-day expiration if no expiry is provided via the secondsToLive field. If secondsToLive is set to 0, the URL will never expire.

      Parameters

      • urlOrOptions: string | CreateShortUrlOptions

        Either a URL string or an options object with url and all available options.

      Returns Promise<WebShortUrlResponse>

    • Creates shortened URLs for the given URLs.

      Defaults to a 1-day expiration if no expiry is provided via the secondsToLive field. If secondsToLive is set to 0, the URL will never expire.

      Parameters

      • urlsOrOptions: string[] | CreateShortUrlsOptions

        Either an array of URL strings or an options object and all available options.

      Returns Promise<WebShortUrlBulkResponse>

    • Deletes a shortened URL by its ID.

      The ID is the unique identifier at the end of the shortened URL.

      Parameters

      • id: string

        The ID of the shortened URL to delete.

      Returns Promise<void>

    • Deletes shortened URLs by their IDs.

      The ID is the unique identifier at the end of the shortened URL.

      Parameters

      • ids: string[]

        The IDs of the shortened URL to delete.

      Returns Promise<void>

    • Fetch content from a URL.

      Parameters

      • url: string

        The URL to fetch content from.

      Returns Promise<string>