Installation
npm install --save @types/google-images
Summary
This package contains type definitions for google-images (https://github.com/vadimdemedes/google-images).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/google-images.
index.d.ts
export = GoogleImages;
declare namespace GoogleImages {
type SearchImageSize = "icon" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "huge";
type SearchImageType = "clipart" | "face" | "lineart" | "news" | "photo";
type SearchDominantColor =
| "black"
| "blue"
| "brown"
| "gray"
| "green"
| "pink"
| "purple"
| "teal"
| "white"
| "yellow";
type SearchColorType = "color" | "gray" | "mono";
type SearchSafe = "high" | "medium" | "off";
interface SearchOptions {
page?: number | undefined;
size?: SearchImageSize | undefined;
type?: SearchImageType | undefined;
dominantColor?: SearchDominantColor | undefined;
colorType?: SearchColorType | undefined;
safe?: SearchSafe | undefined;
}
interface Image {
url: string;
type: string;
width: number;
height: number;
size: number;
thumbnail: {
url: string;
width: number;
height: number;
};
}
}
declare class GoogleImages {
constructor(engineId: string, apiKey: string);
search(searchTerm: string, options?: GoogleImages.SearchOptions): Promise<GoogleImages.Image[]>;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by Dolan Miu.