Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ArticleInstanceFilesClient

Index

Constructors

constructor

Properties

Protected ArticleInstanceFilesBatchClient

ArticleInstanceFilesBatchClient: ArticleInstanceFilesBatchClient

Protected apiClient

apiClient: ApiClient

Protected articleInstanceFilesRoute

articleInstanceFilesRoute: ArticleInstanceFilesRoute

Protected articleInstanceFilesStreamsClient

articleInstanceFilesStreamsClient: ArticleInstanceFilesStreamsClient

Accessors

batch

routeDefinition

streams

Methods

find

  • Returns a promise that is resolved once the find action has been performed. Success response returns a list of file resources matching the given criteria.

    method
    example

    articleInstanceFilesClient.find({ pageNumber : 1, pageSize : 10, orderBy : '', orderDirection : '', search : '' }) .then(function (collection) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • articleId: string

      Article slug or id which uniquely identifies article whose article files need to be retrieved.

    • Optional options: IOptions

      Query resource options object.

    Returns PromiseLike<IHttpResponse<IQueryModel<IArticleFile>>>

    A promise that is resolved once the find action has been performed.

get

  • Returns a promise that is resolved once the get action has been performed. Success response returns requested file resource.

    method
    example

    articleInstanceFilesClient.get('') .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • articleId: string

      Article slug or id which uniquely identifies article whose article files need to be retrieved.

    • id: string

      Article file id which uniquely identifies article file that needs to be retrieved.

    • Optional options: IGetRequestOptions

      options object that contains embed data.

    Returns PromiseLike<IHttpResponse<IArticleFile>>

    A promise that is resolved once the get action has been performed.

link

  • Returns a promise that is resolved once the link action has been performed; this action links file resource from other modules into the Article Files module (For example: file resources from the Media Vault module can be linked directly into the Article Files module).

    method
    example

    articleInstanceFilesClient.link(fileObject) .then(function (response, status, headers, config) { // perform success handling here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • articleId: string

      Article slug or id which uniquely identifies article whose article files need to be linked.

    • data: IArticleFile

      A article file object that need to be inserted into the system.

    Returns PromiseLike<IHttpResponse<IArticleFile>>

    A promise that is resolved once the link action has been performed.

unlink

  • Returns a promise that is resolved once the unlink action has been performed. This action will remove one or many file resources from the system if successfully completed. Specified file and all its accompanying derived resources will be removed from the system. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply baasicArticleFilesRouteService route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.removeParams(fileEntry);
    let uri = params['model'].links('unlink').href;
    
    method
    example

    // fileEntry is a file resource previously fetched using get action. The following action will remove the original file resource and all accompanying derived file resources. articleInstanceFilesRoute.remove(fileEntry) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • articleId: string

      Article slug or id which uniquely identifies article whose article files need to be deleted.

    • data: IArticleFile
    • options: Object

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the unlink action has been performed.

unlinkByArticle

  • Returns a promise that is resolved once the unlink by article action has been performed. This action will remove all file resources from the system related to the requested article if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply baasicArticleService route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.removeParams(fileEntry);
    let uri = params['model'].links('unlink-by-article').href;
    
    method
    example

    // fileEntry is a file resource previously fetched using get action. articleInstanceFilesClient.unlinkByArticle(fileEntry) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • articleId: string

      Article slug or id which uniquely identifies article whose article files need to be deleted.

    • data: IArticleFile
    • options: Object

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the unlink by article action has been performed.

update

  • Returns a promise that is resolved once the update file action has been performed; this action will update a file resource if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply baasicArticleFilesRouteService route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(fileEntry);
    let uri = params['model'].links('put').href;
    
    method
    example

    // fileEntry is a file resource previously fetched using get action. fileEntry.description = ''; articleInstanceFilesClient.update(fileEntry) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • articleId: string

      An article object used to update specified article resource.

    • data: IArticleFile

      Article File object used to update specific article file data in the system.

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the update file action has been performed.

Generated using TypeDoc