import AdvertisementService from 'clinical6/src/services/AdvertisementService.js'
AdvertisementService
Service handling Advertisements (images).
Administrators can configure your app's carousel content on your Clinical6 dashboard under CMS > Image Carousel. These advertisements consist of a title, an image, an action to be taken when the image is tapped, and detailed action information.
Your advertisements can also be tagged to help organize your content.
Method Summary
Public Methods | ||
public |
get(imageVersions: String, tagNames: String[]): Promise<Advertisement> Retrieves the list of images in a advertisement with their corresponding attributes and actions given a advertisement |
|
public |
Retrieves advertisement settings. |
Public Methods
public get(imageVersions: String, tagNames: String[]): Promise<Advertisement> source
Retrieves the list of images in a advertisement with their corresponding attributes and actions given a advertisement
Once your carousel images are ready, you can access them through the get
method. We highly
recommend including device-optimized images. You can filter your images by device-specific
versions and tags.
Throw:
If missing token |
Decorators:
- deprecate
Example:
import { advertisementService } from 'clinical6';
let imageVersion = 'galaxy_s4';
let tags = ['government','capital','DC'];
advertisementService.get(imageVersion, tags).then((data) => {
// display carousel
});
advertisementService.get();