Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
try{let result = await SMHFavoriteApis.favorite({libraryId:"libraryId",spaceId:"spaceId",path:'path'});}catch(e){// exception handling}
Request parameters. | Description | Type | Required or Not |
libraryId | Media Library ID, obtained after creating a media library in the media hosting console. Please refer to Create Media Library. | String | Yes |
spaceId | Space ID, see Create Tenant Space | String | Yes |
inode | File directory ID, can be a file or directory | String | No |
path | File directory path. Choose either this or the inode parameter. If both inode and path are specified, inode takes precedence. | String | No |
try{let result = await SMHFavoriteApis.listFavorite({libraryId:"libraryId",spaceId:"spaceId",orderBy:SMHFileListOrderBy.favoriteTime,orderByType:SMHOrderByType.asc,limit:"5"});}catch(e){// exception handling}
Request parameters. | Description | Type | Required or Not |
libraryId | Media Library ID, obtained after creating a media library in the media hosting console. Please refer to Create Media Library. | String | Yes |
spaceId | Space ID, see Create Tenant Space | String | Yes |
marker | List paginated identification in sequence | String | No |
limit | Number limit for locally listed items when paginating in sequence, defaults to 20 | String | No |
page | Pagination code, defaults to first page, optional parameter, cannot be used with marker and limit parameters | Number | No |
pageSize | Page size, defaults to 20, optional parameter, cannot be used with marker and limit parameters | Number | No |
orderBy | sorting field, sorted by favoriteTime (default), currently only support sorting by favoriteTime | SMHFileListOrderBy | No |
orderByType | sorting method, asc for ascending, desc for descending | SMHOrderByType | No |
withPath | whether to return the path, true for return, false for do not return (default) | Bool | No |
try{let result = await SMHFavoriteApis.cancelFavorite({libraryId:"libraryId",spaceId:"spaceId",path:'path'});}catch(e){// exception handling}
Request parameters. | Description | Type | Required or Not |
libraryId | Media Library ID, obtained after creating a media library in the media hosting console. Please refer to Create Media Library. | String | Yes |
spaceId | Space ID, see Create Tenant Space | String | Yes |
inode | File directory ID, can be a file or directory | String | No |
path | File directory path. Choose either this or the inode parameter. If both inode and path are specified, inode takes precedence. | String | No |
文档反馈