Package blue.starry.penicillin.core.response

Types

Link copied to clipboard
interface ApiResponse<R : Any>

Represents Twitter API response.

Link copied to clipboard
interface CompletedResponse

Represents this response is completed and its response is String.

Link copied to clipboard
data class CursorJsonObjectResponse<M : PenicillinCursorModel<T>, T : Any>(    val client: ApiClient,     val result: M,     val request: HttpRequest,     val response: HttpResponse,     val content: String,     val action: ApiAction<CursorJsonObjectResponse<M, T>>) : ApiResponse<CursorJsonObjectResponse<M, T>> , JsonResponse<M, JsonObject> , CompletedResponse

The ApiResponse that provides parsed json object with json model. This class supports cursor api operation.

Link copied to clipboard
data class JsonArrayResponse<M : PenicillinModel>(    val client: ApiClient,     val results: List<M>,     val request: HttpRequest,     val response: HttpResponse,     val content: String,     val action: ApiAction<JsonArrayResponse<M>>) : ApiResponse<JsonArrayResponse<M>> , JsonResponse<M, JsonArray> , CompletedResponse, List<M>

The ApiResponse that provides parsed json array with json model.

Link copied to clipboard
data class JsonObjectResponse<M : PenicillinModel>(    val client: ApiClient,     val result: M,     val request: HttpRequest,     val response: HttpResponse,     val content: String,     val action: ApiAction<JsonObjectResponse<M>>) : ApiResponse<JsonObjectResponse<M>> , JsonResponse<M, JsonObject> , CompletedResponse

The ApiResponse that provides parsed json object with json model.

Link copied to clipboard
interface JsonResponse<M : PenicillinModel, T : JsonElement>

Represents this request has json response and it's parsed with PenicillinModel.

Link copied to clipboard
data class PremiumSearchJsonObjectResponse<M : PremiumSearchModel>(    val client: ApiClient,     val result: M,     val request: HttpRequest,     val response: HttpResponse,     val content: String,     val action: ApiAction<PremiumSearchJsonObjectResponse<M>>,     val environment: PremiumSearchEnvironment) : ApiResponse<PremiumSearchJsonObjectResponse<M>> , JsonResponse<M, JsonObject> , CompletedResponse

The ApiResponse that provides parsed json object with json model. This class supports premium search api operations.

Link copied to clipboard
data class StreamResponse<L : StreamListener, H : StreamHandler<L>>(    val client: ApiClient,     val request: HttpRequest,     val response: HttpResponse,     val action: ApiAction<StreamResponse<L, H>>) : ApiResponse<StreamResponse<L, H>>

The ApiResponse that provides stream-able response.

Link copied to clipboard
data class TextResponse(    val client: ApiClient,     val request: HttpRequest,     val response: HttpResponse,     val content: String,     val action: ApiAction<TextResponse>) : ApiResponse<TextResponse> , CompletedResponse

The ApiResponse that provides text response only.