TraktAuthApi

class TraktAuthApi(client: HttpClient, config: TraktClientConfig)

Constructors

Link copied to clipboard
constructor(client: HttpClient, config: TraktClientConfig)

Functions

Link copied to clipboard

Generate a device code for devices with limited input capabilities. The user will then visit the verification_url and enter the user_code.

Link copied to clipboard
suspend fun pollDeviceToken(deviceCode: String): TraktAccessToken

Poll this endpoint to get the access token once the user has authorized the device. Use the interval from the device code response to determine polling frequency.

Link copied to clipboard
Link copied to clipboard
suspend fun requestAccessToken(redirectUri: String, code: String): TraktAccessToken
Link copied to clipboard
suspend fun requestRefreshToken(redirectUri: String, refreshToken: String): TraktAccessToken
Link copied to clipboard
suspend fun revokeToken(token: String)

Revoke an access token when a user signs out. This will invalidate the access_token and refresh_token.