Image~Image(paramsopt)

Class representing image.

new Image(paramsopt)

Create image.

Parameters:
Name Type Attributes Description
params object <optional>

Image parameters.

Properties
Name Type Attributes Default Description
id number <optional>
0

Image ID.

width number <optional>
0

Image width.

height number <optional>
0

Image height.

type string | ImageType <optional>
ImageTypes.JPEG

Image type.

book Book <optional>
Book.Unknown

Image's Book.

Members

book :Book

Image parent book.

filename :string

Image filename.

height :number

Image height.

id :number

Image ID.

isCover :boolean

Whatever this image is book cover.

type :ImageType

Image type.

types :ImageTypes

Image types.

width :number

Image width.

Methods

static parse(image, idopt) → {Image}

Parse pure image object from API into class instance.

Parameters:
Name Type Attributes Default Description
image APIImage

Image object

id number <optional>
0

Image id (a.k.a. page number).

Returns:
Image -

Image instance.