Digital Flyer
The entry-point for interacting with the SDK.
The DigitalFlyer is used in order to retrieve Publications from the server.
import com.tctranscontinental.android.digitalflyer.DigitalFlyer
val digitalFlyer = DigitalFlyer(
subscriptionKey = subscriptionKey,
client = client,
banner = banner,
environment = environment
)
val publications = digitalFlyer.listPublications(
storeId = storeId,
language = language,
date = date
)
val publication = digitalFlyer.getPublication(
attributes = attributes,
orientation = FlyerLayout.VERTICAL
)
While it’s technically possible to instantiate multiple DigitalFlyer objects with the same inputs on-demand, it’s recommended to use a single instance throughout your application (e.g. a reference in your Application class).
Instantiating multiple DigitalFlyer objects with different inputs is not currently supported. It will result in undefined behavior.
Parameters
The subscription key, as provided by TC, associated with the application
The client's name, as provided by TC, associated with this instance
The banner, as provided by TC, associated with this instance
The API Environment associated with this instance
Throws
if the subscription key is an empty string.
if the client is an empty string.
if the banner is an empty string.
Constructors
Functions
Retrieve the full Publication, including attributes and page content.
Retrieves a list of categories with their subcategories.
Retrieve a list of all active publications.