Package blue.starry.penicillin.core.request.action

Types

Link copied to clipboard
interface ApiAction<R>

Represents lazy ApiRequest invoker.

Link copied to clipboard
class CursorJsonObjectApiAction<M : PenicillinCursorModel<T>, T : Any>(    val client: ApiClient,     val request: ApiRequest,     val converter: (JsonObject) -> M) : AbstractFlow<T> , JsonRequest<M> , ApiAction<CursorJsonObjectResponse<M, T>>

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

Link copied to clipboard
class EmptyApiAction(val client: ApiClient, val request: ApiRequest) : ApiAction<Unit>

The ApiAction that does not provide parsed response. Only check errors of content string.

Link copied to clipboard
class JsonArrayApiAction<M : PenicillinModel>(    val client: ApiClient,     val request: ApiRequest,     val converter: (JsonObject) -> M) : AbstractFlow<M> , JsonRequest<M> , ApiAction<JsonArrayResponse<M>>

The ApiAction that provides parsed json array with json model.

Link copied to clipboard
class JsonObjectApiAction<M : PenicillinModel>(    val client: ApiClient,     val request: ApiRequest,     val converter: (JsonObject) -> M) : JsonRequest<M> , ApiAction<JsonObjectResponse<M>>

The ApiAction that provides parsed json object with json model.

Link copied to clipboard
interface JsonRequest<M : PenicillinModel>

Represents this request is expected to receive json response, and it's parsed with PenicillinModel.

Link copied to clipboard
class PremiumSearchJsonObjectApiAction<M : PremiumSearchModel>(    val client: ApiClient,     val request: ApiRequest,     val converter: (JsonObject) -> M,     val environment: PremiumSearchEnvironment) : JsonRequest<M> , ApiAction<PremiumSearchJsonObjectResponse<M>>

The ApiAction that provides parsed json array with json model. This class supports premium search api operations.

Link copied to clipboard
class StreamApiAction<L : StreamListener, H : StreamHandler<L>>(val client: ApiClient, val request: ApiRequest)

The ApiAction that provides stream-able response.

Link copied to clipboard
class TextApiAction(val client: ApiClient, val request: ApiRequest) : ApiAction<TextResponse>

The ApiAction that provides text response only.