UNPKG

@goteborgco/open-api-js-client

Version:

Official JavaScript client for the Göteborg & Co GraphQL API

33 lines (32 loc) 1.05 kB
import { Image } from './Image'; /** * Represents different sizes of a media item */ export declare class MediaSizes { readonly medium?: Image; readonly thumbnail?: Image; readonly large?: Image; readonly full?: Image; constructor(data: any); /** * Get a specific size * @param size The size to get * @returns The image data for the requested size or undefined */ getSize(size: 'full' | 'large' | 'medium' | 'thumbnail'): Image | undefined; /** * Get the URL for a specific size * @param size The size to get the URL for * @returns The URL for the requested size or undefined */ getUrl(size: 'full' | 'large' | 'medium' | 'thumbnail'): string | undefined; /** * Get the dimensions for a specific size * @param size The size to get dimensions for * @returns The dimensions for the requested size or undefined */ getDimensions(size: 'full' | 'large' | 'medium' | 'thumbnail'): { width: number; height: number; } | undefined; }