getChannel
Fetches information about the channel
This method sends a GET request to the getChannel endpoint of the Vue Storefront API Middleware. In turn, it receives data from the getChannel endpoint exposed by the BigCommerce API
Signature
declare function getChannel$1(
props?: GetChannelParams,
options?: MethodOptions
): Promise<GetChannelResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Optional | GetChannelParams | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions |
Returns
Returns a response with the channel object
Referenced Types
Examples
Fetching a channel.
import { sdk } from '~/sdk.config.ts';
const channelResponse = await sdk.bigcommerce.getChannel()Fetching a channel. Sending it this way, the response can be cached safely.
import { sdk } from '~/sdk.config.ts';
const channel = ...
const channelResponse = await sdk.bigcommerce.getChannel({ channel });