From f08e36e3bf70f219acc98943f263bb96f3e33677 Mon Sep 17 00:00:00 2001 From: "Tanner W. Stokes" Date: Tue, 17 May 2022 13:13:14 -0400 Subject: [PATCH 1/3] Add optional groups array for remote site designs. --- WordPressKit/RemoteSiteDesign.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WordPressKit/RemoteSiteDesign.swift b/WordPressKit/RemoteSiteDesign.swift index 078f14ae..fabe9217 100644 --- a/WordPressKit/RemoteSiteDesign.swift +++ b/WordPressKit/RemoteSiteDesign.swift @@ -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] @@ -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 } @@ -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) } From 92e47d917005a1277ab4fd2ad8191377cbf1c760 Mon Sep 17 00:00:00 2001 From: "Tanner W. Stokes" Date: Wed, 18 May 2022 21:24:22 -0400 Subject: [PATCH 2/3] Match API property name. --- WordPressKit/RemoteSiteDesign.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WordPressKit/RemoteSiteDesign.swift b/WordPressKit/RemoteSiteDesign.swift index fabe9217..594448c6 100644 --- a/WordPressKit/RemoteSiteDesign.swift +++ b/WordPressKit/RemoteSiteDesign.swift @@ -33,7 +33,7 @@ public struct RemoteSiteDesign: Codable { public let mobileScreenshot: String? public let tabletScreenshot: String? public let themeSlug: String? - public let groups: [String]? + public let group: [String]? public let segmentID: Int64? public let categories: [RemoteSiteDesignCategory] @@ -45,7 +45,7 @@ public struct RemoteSiteDesign: Codable { case mobileScreenshot = "preview_mobile" case tabletScreenshot = "preview_tablet" case themeSlug = "theme" - case groups + case group case segmentID = "segment_id" case categories } @@ -59,7 +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) + group = try? map.decode([String].self, forKey: .group) segmentID = try? map.decode(Int64.self, forKey: .segmentID) categories = try map.decode([RemoteSiteDesignCategory].self, forKey: .categories) } From 191298e10fde30f9df1d1c680c5b5e56411c7bda Mon Sep 17 00:00:00 2001 From: "Tanner W. Stokes" Date: Thu, 2 Jun 2022 11:03:58 -0400 Subject: [PATCH 3/3] Bump podspec. --- WordPressKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressKit.podspec b/WordPressKit.podspec index c0c4cff6..acbf17c6 100644 --- a/WordPressKit.podspec +++ b/WordPressKit.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = 'WordPressKit' - s.version = '4.53.0' + s.version = '4.54.0-beta.1' s.summary = 'WordPressKit offers a clean and simple WordPress.com and WordPress.org API.' s.description = <<-DESC