@youon/assets-api-wrapper
v1.1.2
Published
A js wrapper for skoiy's assets api version 1
Downloads
2
Readme
ASSETS API WRAPPER
const { AssetsApiClient } = require('@youon/assets-api-wrapper');
window.AssetsApiClient = require('@youon/assets-api-wrapper').AssetsApiClient;
import { AssetsApiClient } from '@youon/assets-api-wrapper';
const endpoints = new AssetsApiClient("host",1,"key","token");
Initial config
these params are passed in the constructor of VideoApiClient
| Param | Description | | -------- | ----------------------------------- | | Host | Api Host endpoint | | Version | Api Version | | apiKey | Api Key Available on Accounts APP | | apiToken | Api Token Available on Accounts APP |
Methods
getAlbums(params = null)
getAlbum(albumId, params = null)
getAlbumAssets(albumId, params = null)
getAssets(params = null)
getAsset(assetId, params = null)
getGalleries(params = null)
getGallery(galleryId, params = null)
getGalleryAlbuns(galleryId, params = null)
getGalleryAssets(galleryId, params = null)
getDirectories(params = null)
getDirectory(directoryId, params = null)
getDirectoryAssets(directoryId, params = null)
getDirectoriesTree(params = null)
getAlbumDirectoryTree(folderId, params = null)
getAlbumDirectoryAlbums($folderId, params = null)
Params
the params argument is an object that is transformed into a query
type Params = {[key:string]:any}
{
filter_by: "tags.variants.key=idAtleta,tags.variants.value=186411",
order_by: "name", //id, name, size, metadata.created, created
order: "asc", //asc,desc
page: 1,
per_page: 6
}
| URI | Description | Query parameters | Notes | | ------------------------------------------------- | --------------------------------------------- | ----------------------------------------------------------------- | ----- | | getAlbums(params = null) | Return Albuns list | &order_by=name&order=asc | | | getAlbum(albumId, params = null) | Show information about a Album | --- | | | getAlbumAssets(albumId, params = null) | Return Assets list inside a Album | &order_by=id&order=asc | | | getAssets(params = null) | Return Assets list | &filter_by=tags.variants.value=186411 | | | getAsset(assetId, params = null) | Show information about a Asset | --- | | | getGalleries(params = null) | Return Galleries list | &order_by=position&order=desc | | | getGallery(galleryId, params = null) | Show information about a Gallery | --- | | | getGalleryAlbuns(galleryId, params = null) | Return Albums list inside a Gallery | &order_by=created&order=desc | | | getGalleryAssets(galleryId, params = null) | Return Assets list inside a Gallery | &order_by=created&order=desc&filter_by=tags.variants.key=idAtleta | | | getDirectories(params = null) | Return Directories list | &page=1&per_page=6 | | | getDirectory(directoryId, params = null) | Show information about a Directory | --- | | | getDirectoryAssets(directoryId, params = null) | Return Assets list inside a Directory | &order_by=size&order=desc | | | getDirectoriesTree(params = null) | Return Directories tree | --- | | | getAlbumDirectoryTree(folderId, params = null) | Return Album Directory tree | &page=1&per_page=6 | | | getAlbumDirectoryAlbums($folderId, params = null) | | | |