2024-01-20 16:16:14 +00:00
|
|
|
|
2024-07-10 22:11:18 +00:00
|
|
|
import { ITag, ITagResponse, ITagsResponse } from '@/app/lib/tags'
|
2024-07-10 02:34:23 +00:00
|
|
|
import { IMeta } from 'types';
|
2024-01-20 16:16:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
export interface IToysResponse {
|
|
|
|
data: IToy[];
|
|
|
|
meta: IMeta;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IToy {
|
|
|
|
id: number;
|
|
|
|
attributes: {
|
|
|
|
tags: ITagsResponse;
|
|
|
|
linkTag: ITagResponse;
|
|
|
|
make: string;
|
|
|
|
model: string;
|
|
|
|
aspectRatio: string;
|
|
|
|
image2: string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface IToysListProps {
|
|
|
|
toys: IToysResponse;
|
|
|
|
page: number;
|
|
|
|
pageSize: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** This endpoint doesn't exist at the moment, but definitely could in the future */
|
|
|
|
// export function getUrl(toy: IToy): string {
|
|
|
|
// return `${siteUrl}/toy/${toy.name}`
|
|
|
|
// }
|
|
|
|
|
|
|
|
// export function getToysForVtuber(vtuberId: number, page: number = 1, pageSize: number = 25): Promise<IToys> {
|
|
|
|
// const tvrs = await getTagVodRelationsForVtuber(vtuberId, page, pageNumber);
|
|
|
|
// return {
|
|
|
|
// data: tvrs.data.
|
|
|
|
// pagination: tvrs.pagination
|
|
|
|
// }
|
|
|
|
// }
|