2.1.4 • Published 6 months ago

@types/google-images v2.1.4

Weekly downloads
205
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for google-images 2.1
// Project: https://github.com/vadimdemedes/google-images
// Definitions by: Dolan Miu <https://github.com/dolanmiu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Thu, 08 Jul 2021 12:02:25 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Dolan Miu.

2.1.2

8 months ago

2.1.4

6 months ago

2.1.3

7 months ago

2.1.1

3 years ago

2.1.0

7 years ago