Skip to content

Instantly share code, notes, and snippets.

@jamesrochabrun
Last active June 17, 2021 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesrochabrun/bf15c92285f92a50320d878915fa7a20 to your computer and use it in GitHub Desktop.
Save jamesrochabrun/bf15c92285f92a50320d878915fa7a20 to your computer and use it in GitHub Desktop.
Itunes Remote implementation.
// 1
final class ItunesRemote: ObservableObject {
// 2
struct ItunesCategorySection: IdentifiableHashable {
let sectionID: ItunesCategoryIdentifier
let cellIDs: [FeedItemViewModel]
var id: ItunesCategoryIdentifier { sectionID }
}
// 3
private let service = ItunesClient()
// 4
private var cancellables: Set<AnyCancellable> = []
@Published var itunesSections: [ItunesSection] = []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment