diff options
author | Nicholas Tay <nick@windblume.net> | 2022-03-20 01:54:36 +1100 |
---|---|---|
committer | Nicholas Tay <nick@windblume.net> | 2022-03-20 01:54:36 +1100 |
commit | 72cb5b0afef7fe861db5f8e30064478fa05f7025 (patch) | |
tree | 4efc3ba852962a24a4e6408d284a1dbe69beefbf /foray/ForayItems.swift | |
parent | e37397519e44f546adf550ab4c11e39eeefe252d (diff) | |
download | forayios-72cb5b0afef7fe861db5f8e30064478fa05f7025.tar.gz forayios-72cb5b0afef7fe861db5f8e30064478fa05f7025.tar.bz2 forayios-72cb5b0afef7fe861db5f8e30064478fa05f7025.zip |
Split structs into other file, split networking out
It isn't much so far, as it is just effectively the API retrieval
function extracted from the TableViewController. But this should also
allow other VCs to get from API too if required :^)
Diffstat (limited to '')
-rw-r--r-- | foray/ForayItems.swift | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/foray/ForayItems.swift b/foray/ForayItems.swift new file mode 100644 index 0000000..f1a1089 --- /dev/null +++ b/foray/ForayItems.swift @@ -0,0 +1,25 @@ +// +// ForayItems.swift +// foray +// +// Created by Nicholas Tay on 20/3/2022. +// + +import Foundation + +enum ItemType: String, Decodable { + case item + case quest +} + +struct YearSection { + var year: Date + var items: [PenguinItem] +} + +struct PenguinItem: Decodable { + var type: ItemType + var releaseDate: Date + var id: String + var name: String +} |