From cdb3943822a0d9874f225e72ec66b26e431b34f5 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 15 Sep 2021 13:35:32 +0200 Subject: [PATCH] Update Asset doc --- docs/api/asset.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/api/asset.md b/docs/api/asset.md index e23cb1969..1166bf458 100644 --- a/docs/api/asset.md +++ b/docs/api/asset.md @@ -9,6 +9,32 @@ * `type` **[String][1]** Asset type, eg. 'image'. * `src` **[String][1]** Asset URL, eg. '[https://.../image.png][2]'. +### getType + +Get asset type. + +#### Examples + +```javascript +// Asset: { src: 'https://.../image.png', type: 'image' } +asset.getType(); // -> 'image' +``` + +Returns **[String][1]** + +### getSrc + +Get asset URL. + +#### Examples + +```javascript +// Asset: { src: 'https://.../image.png' } +asset.getSrc(); // -> 'https://.../image.png' +``` + +Returns **[String][1]** + ### getFilename Get filename of the asset (based on `src`).