cloudflare
Version:
The official TypeScript library for the Cloudflare API
30 lines • 1.07 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { path } from "../../internal/utils/path.mjs";
export var BaseURLs = /* @__PURE__ */ (() => {
class BaseURLs extends APIResource {
/**
* Retrieves the endpoint URL for an AI Gateway.
*
* @example
* ```ts
* const url = await client.aiGateway.urls.get('workers-ai', {
* account_id: '0d37909e38d3e99c29fa2cd343ac421a',
* gateway_id: 'my-gateway',
* });
* ```
*/
get(provider, params, options) {
const { account_id, gateway_id } = params;
return this._client.get(path `/accounts/${account_id}/ai-gateway/gateways/${gateway_id}/url/${provider}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseURLs._key = Object.freeze([
'aiGateway',
'urls',
]);
return BaseURLs;
})();
export class URLs extends BaseURLs {
}
//# sourceMappingURL=urls.mjs.map