[Library] iTunes library (#5)
This PR contains the work done to implement the `iTunesService` service that fetches the reviews from the **Apple App Store**. Reviewed-on: rock-n-code/app-reviews#5 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #5.
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// 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()
|
||||
)
|
||||
]
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user