Defined the GetReviewsEndpoint protocol in the Feed library.

This commit is contained in:
Javier Cicchelli 2024-03-17 16:08:51 +01:00
parent 7a7df4cfea
commit 93a52fd93e

View File

@ -0,0 +1,44 @@
//
// GetReviewsEndpoint.swift
// ReviewsFeedKit
//
// Created by Javier Cicchelli on 17/03/2024.
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
//
import Foundation
public protocol GetReviewsEndpoint: Endpoint
where Input == GetReviewsInput,
Output == GetReviewsOutput {}
// MARK: - Input
public struct GetReviewsInput: EndpointInput {
// MARK: Constants
public let appID: String
public let countryCode: String
// MARK: Initialisers
public init(
appID: String,
countryCode: String
) {
self.appID = appID
self.countryCode = countryCode
}
}
// MARK: - Output
public struct GetReviewsOutput: EndpointOutput {
// MARK: Constants
public let reviews: [Review]
// MARK: Initialisers
public init(reviews: [Review]) {
self.reviews = reviews
}
}