Skip to content

Commit

Permalink
Add optional groups array for remote site designs.
Browse files Browse the repository at this point in the history
  • Loading branch information
twstokes committed May 19, 2022
1 parent 8e9d40a commit f08e36e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions WordPressKit/RemoteSiteDesign.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public struct RemoteSiteDesign: Codable {
public let mobileScreenshot: String?
public let tabletScreenshot: String?
public let themeSlug: String?
public let groups: [String]?
public let segmentID: Int64?
public let categories: [RemoteSiteDesignCategory]

Expand All @@ -44,6 +45,7 @@ public struct RemoteSiteDesign: Codable {
case mobileScreenshot = "preview_mobile"
case tabletScreenshot = "preview_tablet"
case themeSlug = "theme"
case groups
case segmentID = "segment_id"
case categories
}
Expand All @@ -57,6 +59,7 @@ public struct RemoteSiteDesign: Codable {
mobileScreenshot = try? map.decode(String.self, forKey: .mobileScreenshot)
tabletScreenshot = try? map.decode(String.self, forKey: .tabletScreenshot)
themeSlug = try? map.decode(String.self, forKey: .themeSlug)
groups = try? map.decode([String].self, forKey: .groups)
segmentID = try? map.decode(Int64.self, forKey: .segmentID)
categories = try map.decode([RemoteSiteDesignCategory].self, forKey: .categories)
}
Expand Down

0 comments on commit f08e36e

Please sign in to comment.