Class: EvmNftMedia
moralis-monorepo / @moralisweb3/common-evm-utils / EvmNftMedia
Class: EvmNftMedia
@moralisweb3/common-evm-utils.EvmNftMedia
The EvmNftMedia is a representation of an processed NFT media.
Implements
MoralisDataObject
Table of contents
Methods
Accessors
Constructors
Methods
create
▸ Static
create(data
): EvmNftMedia
Create a new instance of EvmNftMedia from any valid input
Example
const media = EvmNftMedia.create(data);
Parameters
Name | Type | Description |
---|---|---|
data | EvmNftMediaInput | EvmNftMedia instance or valid EvmNftMediaInput |
Returns
equals
▸ Static
equals(dataA
, dataB
): boolean
Check the equality between two Erc20 medias
Example
EvmNftMedia.equals(dataA, dataB)
Parameters
Name | Type | Description |
---|---|---|
dataA | EvmNftMediaInput | EvmNftMedia | The first media to compare |
dataB | EvmNftMediaInput | EvmNftMedia | The second media to compare |
Returns
boolean
true if the medias are equal, false otherwise
parse
▸ Static
parse(data
): EvmNftMediaData
Parameters
Name | Type |
---|---|
data | EvmNftMediaInput |
Returns
equals
▸ equals(data
): boolean
Checks the equality of the current media with another erc20 media
Example
media.equals(data)
Parameters
Name | Type | Description |
---|---|---|
data | EvmNftMediaInput | EvmNftMedia | the media to compare with |
Returns
boolean
true if the medias are equal, false otherwise
Implementation of
MoralisDataObject.equals
format
▸ format(): Object
Deprecated
This method will be removed soon. To format the value, use one of the properties.
Returns
Object
Name | Type |
---|---|
category? | EvmNftMediaCategory |
chain | string |
mediaCollection? | { high : EvmNftMediaItem ; low : EvmNftMediaItem ; medium : EvmNftMediaItem } |
mediaCollection.high | EvmNftMediaItem |
mediaCollection.low | EvmNftMediaItem |
mediaCollection.medium | EvmNftMediaItem |
mimetype? | string |
originalMediaUrl? | string |
parentHash? | string |
status? | EvmNftMediaStatus |
updatedAt? | Date |
Implementation of
MoralisDataObject.format
toJSON
▸ toJSON(): Object
Example
media.toJSON()
Returns
Object
a JSON representation of the media.
Name | Type |
---|---|
category? | EvmNftMediaCategory |
chain | string |
mediaCollection? | { high : EvmNftMediaItem ; low : EvmNftMediaItem ; medium : EvmNftMediaItem } |
mediaCollection.high | EvmNftMediaItem |
mediaCollection.low | EvmNftMediaItem |
mediaCollection.medium | EvmNftMediaItem |
mimetype? | string |
originalMediaUrl? | string |
parentHash? | string |
status? | EvmNftMediaStatus |
updatedAt? | Date |
Implementation of
MoralisDataObject.toJSON
Accessors
category
• get
category(): undefined
| EvmNftMediaCategory
Returns
undefined
| EvmNftMediaCategory
chain
• get
chain(): EvmChain
Returns
mediaCollection
• get
mediaCollection(): undefined
| { high
: EvmNftMediaItem
; low
: EvmNftMediaItem
; medium
: EvmNftMediaItem
}
Returns
undefined
| { high
: EvmNftMediaItem
; low
: EvmNftMediaItem
; medium
: EvmNftMediaItem
}
mimetype
• get
mimetype(): undefined
| string
Returns
undefined
| string
originalMediaUrl
• get
originalMediaUrl(): undefined
| string
Returns
undefined
| string
parentHash
• get
parentHash(): undefined
| string
Returns
undefined
| string
result
• get
result(): EvmNftMediaData
Example
media.result
Returns
all the data without casting it to JSON.
status
• get
status(): undefined
| EvmNftMediaStatus
Returns
undefined
| EvmNftMediaStatus
updatedAt
• get
updatedAt(): undefined
| Date
Returns
undefined
| Date
Constructors
constructor
• new EvmNftMedia(data
)
Parameters
Name | Type |
---|---|
data | EvmNftMediaInput |