ApiResponse

interface ApiResponse<R : Any>

Represents Twitter API response.

Properties

Link copied to clipboard
abstract val action: ApiAction<R>

Executed ApiAction instance.

Link copied to clipboard
abstract val client: ApiClient

Current ApiClient instance.

Link copied to clipboard
abstract val request: HttpRequest

Http request object.

Link copied to clipboard
abstract val response: HttpResponse

Http response object.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
val ApiResponse<*>.accessLevels: Set<AccessLevel>

Set of "x-access-level" header. If this header is absent or unknown, returns empty set.

Link copied to clipboard
val ApiResponse<*>.hasDirectMessagesPermission: Boolean

Checks if this application has "direct messages" permission.

Link copied to clipboard
val ApiResponse<*>.hasReadPermission: Boolean

Checks if this application has "read" permission.

Link copied to clipboard
val ApiResponse<*>.hasWritePermission: Boolean

Checks if this application has "write" permission.

Link copied to clipboard
val ApiResponse<*>.rateLimit: RateLimit?

Twitter API rate limit. If response header does not provide such information, returns null.

Link copied to clipboard
val ApiResponse<*>.responseTimeMs: Int?

"x-response-time" value from response header. if the header is absent or invalid, returns null.

Link copied to clipboard
val ApiResponse<*>.session: Session

Shorthand extension to ApiClient.