Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 852e042

Browse files
committed
Use WordPressComRESTAPIInterfacing in WordPressComServiceRemote
1 parent 0285a53 commit 852e042

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Sources/WordPressKit/Services/WordPressComServiceRemote+SiteCreation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public extension WordPressComServiceRemote {
201201
return
202202
}
203203

204-
wordPressComRestApi.POST(
204+
wordPressComRESTAPI.post(
205205
path,
206206
parameters: requestParameters,
207207
success: { [weak self] responseObject, httpResponse in
@@ -247,7 +247,7 @@ private extension WordPressComServiceRemote {
247247
return requestParameters
248248
}
249249

250-
func decodeResponse(responseObject: AnyObject) throws -> SiteCreationResponse {
250+
func decodeResponse(responseObject: Any) throws -> SiteCreationResponse {
251251

252252
let decoder = JSONDecoder()
253253

Sources/WordPressKit/Services/WordPressComServiceRemote+SiteSegments.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public extension WordPressComServiceRemote {
9393
let endpoint = "segments"
9494
let remotePath = path(forEndpoint: endpoint, withVersion: ._2_0)
9595

96-
wordPressComRestApi.GET(
96+
wordPressComRESTAPI.get(
9797
remotePath,
9898
parameters: nil,
9999
success: { [weak self] responseObject, httpResponse in
@@ -122,7 +122,7 @@ public extension WordPressComServiceRemote {
122122
// MARK: - Serialization support
123123

124124
private extension WordPressComServiceRemote {
125-
private func decodeResponse(responseObject: AnyObject) throws -> [SiteSegment] {
125+
private func decodeResponse(responseObject: Any) throws -> [SiteSegment] {
126126
let decoder = JSONDecoder()
127127
let data = try JSONSerialization.data(withJSONObject: responseObject, options: [])
128128
let response = try decoder.decode([SiteSegment].self, from: data)

Sources/WordPressKit/Services/WordPressComServiceRemote+SiteVerticals.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public extension WordPressComServiceRemote {
9292
return
9393
}
9494

95-
wordPressComRestApi.GET(
95+
wordPressComRESTAPI.get(
9696
path,
9797
parameters: requestParameters,
9898
success: { [weak self] responseObject, httpResponse in
@@ -138,7 +138,7 @@ private extension WordPressComServiceRemote {
138138
return requestParameters
139139
}
140140

141-
func decodeResponse(responseObject: AnyObject) throws -> [SiteVertical] {
141+
func decodeResponse(responseObject: Any) throws -> [SiteVertical] {
142142

143143
let decoder = JSONDecoder()
144144

Sources/WordPressKit/Services/WordPressComServiceRemote+SiteVerticalsPrompt.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public extension WordPressComServiceRemote {
4545
"segment_id": request as AnyObject
4646
]
4747

48-
wordPressComRestApi.GET(
48+
wordPressComRESTAPI.get(
4949
path,
5050
parameters: requestParameters,
5151
success: { [weak self] responseObject, httpResponse in
@@ -74,7 +74,7 @@ public extension WordPressComServiceRemote {
7474
//
7575
private extension WordPressComServiceRemote {
7676

77-
func decodeResponse(responseObject: AnyObject) throws -> SiteVerticalsPrompt {
77+
func decodeResponse(responseObject: Any) throws -> SiteVerticalsPrompt {
7878

7979
let decoder = JSONDecoder()
8080

0 commit comments

Comments
 (0)