bringapp
    Preparing search index...

    Function getEntity

    • Fetches an entity from the specified URL.

      Type Parameters

      • EP = object

      Parameters

      • wpURL: string

        The WordPress URL.

      • onRedirect: (redirectTo: string, responseCode: number) => void

        Callback function to handle redirect responses.

      • onNotFound: () => void

        Callback function to handle not found responses.

      • slug: string | string[] = ""

        The slug of the entity to fetch.

      Returns Promise<null | Entity<EP>>

      The fetched entity or null if there was an error.