@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 30 day expiration if no expiry is provided via the secondsToLive field. If secondsToLive is set to 0, the URL will never expire.

      Parameters

      • url: string

        The URL to shorten. It must be a valid URL and should include the protocol (start with http:// or https://).

      • OptionalsecondsToLive: number

        Seconds to live for the shortened URL. If set to 0, the URL will never expire. Defaults to 30 days.

      Returns Promise<WebShortUrlResponse>

    • 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>

    • Fetch content from a URL.

      Parameters

      • url: string

        The URL to fetch content from.

      Returns Promise<string>