getV1WorkoutsCount.ts•1 kB
/**
* Generated by Kubb (https://kubb.dev/).
* Do not edit manually.
*/
import fetch from '@kubb/plugin-client/clients/axios'
import type { GetV1WorkoutsCountQueryResponse, GetV1WorkoutsCountHeaderParams } from '../types/GetV1WorkoutsCount.ts'
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
function getGetV1WorkoutsCountUrl() {
return `/v1/workouts/count` as const
}
/**
* @summary Get the total number of workouts on the account
* {@link /v1/workouts/count}
*/
export async function getV1WorkoutsCount(headers: GetV1WorkoutsCountHeaderParams, config: Partial<RequestConfig> & { client?: typeof fetch } = {}) {
const { client: request = fetch, ...requestConfig } = config
const res = await request<GetV1WorkoutsCountQueryResponse, ResponseErrorConfig<Error>, unknown>({
method: 'GET',
url: getGetV1WorkoutsCountUrl().toString(),
...requestConfig,
headers: { ...headers, ...requestConfig.headers },
})
return res.data
}