ThanklyClient

class ThanklyClient(config: ThanklyConfig, engine: HttpEngine = OkHttpEngine())

Entry point for the Experience API.

Hides the two-header convention entirely: creating an experience authenticates with the org's access token on X-Authorization, while polling and refining use the per-experience token on Authorization. A partner never sets either.

Constructors

Link copied to clipboard
constructor(config: ThanklyConfig, engine: HttpEngine = OkHttpEngine())

Functions

Link copied to clipboard
suspend fun createExperience(context: ExperienceContext, capabilities: List<CapabilityRequest>, tagId: String, externalCustomerId: String? = null): Experience

Create an experience and return a handle without waiting for generation.

Link copied to clipboard
fun experience(experienceId: String, accessToken: String): Experience

Re-attach to an experience someone else created.

Link copied to clipboard
suspend fun recommend(context: ExperienceContext, capabilities: List<CapabilityRequest>, tagId: String, externalCustomerId: String? = null): ExperienceResult

Create an experience and wait for it to finish.