Constructor
# new ImageMeta(meta_data)
Parameters:
Name | Type | Description |
---|---|---|
meta_data |
Object | The fetched meta data json. |
- Source:
Methods
# getCollection() → {Collection|null}
Get the collection in which the image is in (if any).
- Source:
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.
- Source:
Returns:
Image ID.
- Type
- String
# getOgProperties() → {OgProperties|null}
Get the OpenGraph properties of the image.
- Source:
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).
- Source:
Returns:
Raw UNIX timestamp of the upload date.
- Type
- Number
# getSize() → {Number}
Get the size of the uploaded file in bytes.
- Source:
Returns:
Size of file in bytes.
- Type
- Number
# getUploadTime() → {Date}
Get the time when the image was uploaded.
- Source:
Returns:
The time when the image was uploaded.
- Type
- Date
# getUrl() → {String}
Get the direct URL of the image.
- Source:
Returns:
Direct URL to the image.
- Type
- String
# getViews() → {Number}
Get the number of views of the image.
- Source:
Returns:
View count of the image.
- Type
- Number
# isViewable() → {Boolean}
Check if the image is viewable or was taking down for some reason.
- Source:
Returns:
if the image is viewable or not.
- Type
- Boolean