APIReturnable

public protocol APIReturnable

Defines the methods required for an object to be returned by an APIService

  • Defines how to convert returned Data into an APIReturnable object

    Declaration

    Swift

    init(from data: Data) throws

Available where Self: Decodable

  • init(from:) Default implementation

    Default Implementation

    Conversion from Data to a Decodable type using a JSONDecoder

    Declaration

    Swift

    init(from data: Data) throws