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

Commit cbc5661

Browse files
committed
Use WordPressComRESTAPIInterfacing in DomainsServiceRemote
1 parent 09cd373 commit cbc5661

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Sources/WordPressKit/Services/Domains/DomainsServiceRemote.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
112112
let endpoint = "sites/\(siteID)/domains"
113113
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)
114114

115-
wordPressComRestApi.GET(path, parameters: nil,
115+
wordPressComRESTAPI.get(path, parameters: nil,
116116
success: {
117117
response, _ in
118118
do {
@@ -133,7 +133,7 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
133133

134134
let parameters: [String: AnyObject] = ["domain": domain as AnyObject]
135135

136-
wordPressComRestApi.POST(path, parameters: parameters,
136+
wordPressComRESTAPI.post(path, parameters: parameters,
137137
success: { _, _ in
138138

139139
success()
@@ -149,7 +149,7 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
149149
let endPoint = "domains/supported-states/\(countryCode)"
150150
let servicePath = path(forEndpoint: endPoint, withVersion: ._1_1)
151151

152-
wordPressComRestApi.GET(
152+
wordPressComRESTAPI.get(
153153
servicePath,
154154
parameters: nil,
155155
success: {
@@ -175,7 +175,7 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
175175
let endPoint = "me/domain-contact-information"
176176
let servicePath = path(forEndpoint: endPoint, withVersion: ._1_1)
177177

178-
wordPressComRestApi.GET(
178+
wordPressComRESTAPI.get(
179179
servicePath,
180180
parameters: nil,
181181
success: { (response, _) in
@@ -201,7 +201,7 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
201201

202202
let parameters: [String: AnyObject] = ["contact_information": contactInformation as AnyObject,
203203
"domain_names": domainNames as AnyObject]
204-
wordPressComRestApi.POST(
204+
wordPressComRESTAPI.post(
205205
servicePath,
206206
parameters: parameters,
207207
success: { response, _ in
@@ -239,7 +239,7 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
239239
parameters["quantity"] = quantity as AnyObject
240240
}
241241

242-
wordPressComRestApi.GET(servicePath,
242+
wordPressComRESTAPI.get(servicePath,
243243
parameters: parameters,
244244
success: {
245245
response, _ in
@@ -257,7 +257,7 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
257257
}
258258
}
259259

260-
private func map(suggestions response: AnyObject) throws -> [DomainSuggestion] {
260+
private func map(suggestions response: Any) throws -> [DomainSuggestion] {
261261
guard let jsonSuggestions = response as? [[String: AnyObject]] else {
262262
throw DomainsServiceRemote.ResponseError.decodingFailed
263263
}
@@ -272,7 +272,7 @@ private func map(suggestions response: AnyObject) throws -> [DomainSuggestion] {
272272
return suggestions
273273
}
274274

275-
private func mapDomainsResponse(_ response: AnyObject) throws -> [RemoteDomain] {
275+
private func mapDomainsResponse(_ response: Any) throws -> [RemoteDomain] {
276276
guard let json = response as? [String: AnyObject],
277277
let domainsJson = json["domains"] as? [[String: AnyObject]] else {
278278
throw DomainsServiceRemote.ResponseError.decodingFailed

0 commit comments

Comments
 (0)