ImageMeta

ImageMeta

Image meta data handler.

Constructor

# new ImageMeta(meta_data)

Parameters:
Name Type Description
meta_data Object The fetched meta data json.

Methods

# getCollection() → {Collection|null}

Get the collection in which the image is in (if any).
Returns:
Returns the collection of which the image is posted to, if none returns null.
Type
Collection | null

# getId() → {String}

Get the ID of the image.
Returns:
Image ID.
Type
String

# getOgProperties() → {OgProperties|null}

Get the OpenGraph properties of the image.
Returns:
Returns the OpenGraph properties of the image, null if the image doesn't has any OpenGraph property.
Type
OgProperties | null

# getRawUploadTime() → {Number}

Get the raw upload timestamp (UNIX based).
Returns:
Raw UNIX timestamp of the upload date.
Type
Number

# getSize() → {Number}

Get the size of the uploaded file in bytes.
Returns:
Size of file in bytes.
Type
Number

# getUploadTime() → {Date}

Get the time when the image was uploaded.
Returns:
The time when the image was uploaded.
Type
Date

# getUrl() → {String}

Get the direct URL of the image.
Returns:
Direct URL to the image.
Type
String

# getViews() → {Number}

Get the number of views of the image.
Returns:
View count of the image.
Type
Number

# isViewable() → {Boolean}

Check if the image is viewable or was taking down for some reason.
Returns:
if the image is viewable or not.
Type
Boolean