rozod
    Preparing search index...

    Function fetchApiParam Returns

    Fetches the data from the given endpoint and returns it.

    endpoint The endpoint to fetch from. params The parameters to pass to the endpoint. requestOptions Any additional options to pass to fetch. The response from the endpoint.

    • Param Returns

      Fetches the data from the given endpoint and returns it.

      endpoint The endpoint to fetch from. params The parameters to pass to the endpoint. requestOptions Any additional options to pass to fetch. The response from the endpoint.

      Type Parameters

      Parameters

      • endpoint: S
      • params: ExtractParams<S>
      • requestOptions: Omit<RequestOptions<true>, "returnRaw"> & { returnRaw: true }

      Returns Promise<TypedJsonResponse<ExtractResponse<S>>>

    • Param Returns

      Fetches the data from the given endpoint and returns it.

      endpoint The endpoint to fetch from. params The parameters to pass to the endpoint. requestOptions Any additional options to pass to fetch. The response from the endpoint.

      Type Parameters

      Parameters

      • endpoint: S & { parameters?: undefined }
      • params: undefined | ExtractParams<S>
      • requestOptions: Omit<RequestOptions<true>, "returnRaw"> & { returnRaw: true }

      Returns Promise<TypedJsonResponse<ExtractResponse<S>>>

    • Param Returns

      Fetches the data from the given endpoint and returns it.

      endpoint The endpoint to fetch from. params The parameters to pass to the endpoint. requestOptions Any additional options to pass to fetch. The response from the endpoint.

      Type Parameters

      Parameters

      • endpoint: S
      • params: ExtractParams<S>
      • requestOptions: Omit<RequestOptions<false>, "returnRaw" | "throwOnError"> & {
            returnRaw?: false;
            throwOnError: true;
        }

      Returns Promise<ExtractResponse<S>>

    • Param Returns

      Fetches the data from the given endpoint and returns it.

      endpoint The endpoint to fetch from. params The parameters to pass to the endpoint. requestOptions Any additional options to pass to fetch. The response from the endpoint.

      Type Parameters

      Parameters

      • endpoint: S & { parameters?: undefined }
      • params: undefined | ExtractParams<S>
      • requestOptions: Omit<RequestOptions<false>, "returnRaw" | "throwOnError"> & {
            returnRaw?: false;
            throwOnError: true;
        }

      Returns Promise<ExtractResponse<S>>

    • Param Returns

      Fetches the data from the given endpoint and returns it.

      endpoint The endpoint to fetch from. params The parameters to pass to the endpoint. requestOptions Any additional options to pass to fetch. The response from the endpoint.

      Type Parameters

      Parameters

      • endpoint: S
      • params: ExtractParams<S>
      • OptionalrequestOptions: Omit<RequestOptions<false>, "returnRaw"> & { returnRaw?: false }

      Returns Promise<AnyError | ExtractResponse<S>>

    • Param Returns

      Fetches the data from the given endpoint and returns it.

      endpoint The endpoint to fetch from. params The parameters to pass to the endpoint. requestOptions Any additional options to pass to fetch. The response from the endpoint.

      Type Parameters

      Parameters

      • endpoint: S & { parameters?: undefined }
      • Optionalparams: ExtractParams<S>
      • OptionalrequestOptions: Omit<RequestOptions<false>, "returnRaw"> & { returnRaw?: false }

      Returns Promise<AnyError | ExtractResponse<S>>

    • Param Returns

      Fetches the data from the given endpoint and returns it.

      endpoint The endpoint to fetch from. params Optional parameters to pass to the endpoint. requestOptions Any additional options to pass to fetch. The response from the endpoint.

      Type Parameters

      Parameters

      • endpoint: S
      • params: undefined | ExtractParams<S>
      • OptionalrequestOptions: RequestOptions<R>

      Returns Promise<
          R extends true
              ? TypedJsonResponse<ExtractResponse<S>>
              : AnyError | ExtractResponse<S>,
      >