Classes

The following classes are available globally.

  • APIError is used as a generic wrapper for all kinds of API errors.

    See more

    Declaration

    Swift

    open class APIError : LocalizedError, ErrorSerializable, DownloadErrorSerializable
  • APIRequest encapsulates request creation logic, stubbing options, and response/error parsing.

    See more

    Declaration

    Swift

    open class APIRequest<Model, ErrorModel> : BaseRequest<Model, ErrorModel> where ErrorModel : ErrorSerializable
  • APIStub instance that is used to represent stubbed response. Any properties of this class is presented to serialization classes as if they would be received by URL loading system.

    See more

    Declaration

    Swift

    open class APIStub
  • Base class, that contains common functionality, extracted from APIRequest and MultipartAPIRequest.

    See more

    Declaration

    Swift

    open class BaseRequest<Model, ErrorModel>
  • UploadAPIRequest encapsulates upload request creation logic, stubbing options, and response/error parsing.

    See more

    Declaration

    Swift

    open class UploadAPIRequest<Model, ErrorModel> : BaseRequest<Model, ErrorModel> where ErrorModel : ErrorSerializable
  • DownloadAPIRequest encapsulates download request creation logic, stubbing options, and response/error parsing.

    See more

    Declaration

    Swift

    open class DownloadAPIRequest<Model, ErrorModel> : BaseRequest<Model, ErrorModel> where ErrorModel : DownloadErrorSerializable
  • Plugin, that can be used to log network success and failure responses.

    See more

    Declaration

    Swift

    open class NetworkLoggerPlugin : Plugin
  • TRON is a root object, that serves as a provider for single API endpoint. It is used to create and configure instances of APIRequest and MultipartAPIRequest.

    You need to hold strong reference to TRON instance while your network requests are running.

    See more

    Declaration

    Swift

    open class TRON : TronDelegate
  • CodableParser is a wrapper around modelDecoder and errorDecoder JSONDecoders to be used when decoding JSON response.

    See more

    Declaration

    Swift

    open class CodableParser<Model> : DataResponseSerializerProtocol where Model : Decodable
  • Serializer for objects, that conform to Decodable protocol.

    See more

    Declaration

    Swift

    open class CodableSerializer
  • URLBuilder constructs resulting URL by calling URLByAppendingPathComponent method on baseURL.

    See more

    Declaration

    Swift

    open class URLBuilder