Blackbaud Internet Solutions > REST API (Advanced Donation Form and Images) > 3.0 > Class: ImageService

Class: ImageService

BLACKBAUD.api.ImageService Provides methods for getting information about images in the image gallery

new ImageService(options)

Parameters
Name Type Description
options Object An object literal containing one or more of the following optional properties:
  • url : The URL of the BBIS site from which the data will be retrieved. This value is optional when accessed from a BBIS page. The default value will be the BBIS URL of the current page.
  • crossDomain : Indicates the BBIS url specified is from a separate domain than the current page. When True, the class will handle the complexities of making cross domain requests to retrieve data. The default value is False.

API.js, line 433

Methods

getImagesByFolder(folderPath, successCallback, failureCallback)

Returns a list of images in the specified folder. Only approved images that the user has rights to view will be returned.

Parameters
Name Type Description
folderPath String The path of an image folder whose images should be returned. Example: Folder1/SubFolder1/SubFolder2
successCallback function The function to call if the request succeeds. The function will be passed an array of objects with the following properties:
  • Url : The Url of the image.
  • Caption : The caption of the image.
failureCallback function The function to call if the request fails.

API.js, line 508

getImagesByFolderGUID(folderGUID, successCallback, failureCallback)

Returns a list of images in the specified folder. Only approved images that the user has rights to view will be returned.

Parameters
Name Type Description
folderGUID String The GUID of an image folder whose images should be returned.
successCallback function The function to call if the request succeeds. The function will be passed an array of objects with the following properties:
  • Url : The Url of the image.
  • Caption : The caption of the image.
failureCallback function The function to call if the request fails.

API.js, line 466

getImagesByTag(tag, successCallback, failureCallback)

Returns a list of images with the specified tag. Only approved images that the user has rights to view will be returned.

Parameters
Name Type Description
tag String The tag whose images should be returned.
successCallback function The function to call if the request succeeds. The function will be passed an array of objects with the following properties:
  • Url : The Url of the image.
  • Caption : The caption of the image.
failureCallback function The function to call if the request fails.

API.js, line 487