StandardBrowseConnector

How to get StandardBrowseConnector

ES2015+:

import StandardBrowseConnector from 'fontoxml-connectors-standard/StandardBrowseConnector'

ES5:

define([
	'fontoxml-connectors-standard/StandardBrowseConnector'
], function (
	StandardBrowseConnector
) {
});

Type: Class

The browse connector handles communication with the /browse CMS endpoint.

Do not construct an instance of this connector yourself. Instead, obtain the preconfigured instance by importing fontoxml-configuration/get!browse-connector.

Constructor

# Name Type Description
1. cmsClient CmsClient

The preconfigured connector instance uses the CMS client appropriate for your CMS

Methods

Name Description
browse

Browse the CMS for documents or other assets.


  Arguments
# Name Type Description
1. [context] RemoteDocumentId | Object

The document or its remote ID in which the user wants to browse for assets.

2. assetTypes Array<String>

The type of assets to return, possible values are determined by the backend.

3. resultTypes Array<String>

The type of items to retrieve from the backed. Can be 'file' and/or 'folder'.

4. [folderId] String

If left empty, root is assumed (use this if the backend has no folder hierarchy).

5. [query] Object

Optional implementation-dependent query to be passed to the CMS.

6. [limit] Number

Optional maximum number of results to be passed to the CMS.

7. [offset] Number

Optional index of the first results, allows implementing paging in case there are more results than can be displayed.

8. noCache Boolean

Set to true to configure request headers to force the browser never to cache the result.


  Default value
false
  Returns

Type: Promise

Resolves to a response object. Refer to the CMS endpoint documentation for details on the format used.