This PR contains the work done to implement the `iTunesService` service that fetches the reviews from the **Apple App Store**. Reviewed-on: #5 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
59 lines
1.6 KiB
Swift
59 lines
1.6 KiB
Swift
//
|
|
// Array+Reviews.swift
|
|
// ReviewsiTunesTest
|
|
//
|
|
// Created by Javier Cicchelli on 17/03/2024.
|
|
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
|
//
|
|
|
|
import ReviewsFeedKit
|
|
|
|
extension Array where Element == Review {
|
|
|
|
// MARK: Constants
|
|
static let empty: [Review] = []
|
|
|
|
static let many: [Review] = [
|
|
.init(
|
|
id: 1,
|
|
author: "Some author name #1 goes here...",
|
|
title: "Some title #1 goes here...",
|
|
content: "Some content #1 goes here...",
|
|
rating: 1,
|
|
version: "Some version #1 goes here...",
|
|
updated: .init()
|
|
),
|
|
.init(
|
|
id: 2,
|
|
author: "Some author name #2 goes here...",
|
|
title: "Some title #2 goes here...",
|
|
content: "Some content #2 goes here...",
|
|
rating: 5,
|
|
version: "Some version #2 goes here...",
|
|
updated: .init()
|
|
),
|
|
.init(
|
|
id: 3,
|
|
author: "Some author name #3 goes here...",
|
|
title: "Some title #3 goes here...",
|
|
content: "Some content #3 goes here...",
|
|
rating: 3,
|
|
version: "Some version #3 goes here...",
|
|
updated: .init()
|
|
)
|
|
]
|
|
|
|
static let one: [Review] = [
|
|
.init(
|
|
id: 1,
|
|
author: "Some author name goes here...",
|
|
title: "Some title goes here...",
|
|
content: "Some content goes here...",
|
|
rating: 3,
|
|
version: "Some version goes here...",
|
|
updated: .init()
|
|
)
|
|
]
|
|
|
|
}
|