@@ -13,13 +13,13 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
1313
1414 let endpoint = " jetpack-blogs/ \( siteID) /rest-api "
1515 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
16- let parameters = [ " path " : " /jetpack/v4/settings " ]
16+ let parameters : [ String : Any ] = [ " path " : " /jetpack/v4/settings " ]
1717
18- wordPressComRestApi . GET ( path,
19- parameters: parameters as [ String : AnyObject ] ? ,
20- success: {
21- response, _ in
22- guard let results = response [ " data " ] as? [ String : AnyObject ] ,
18+ wordPressComRESTAPI . get ( path,
19+ parameters: parameters,
20+ success: { response , _ in
21+ guard let responseDict = response as? [ String : Any ] ,
22+ let results = responseDict [ " data " ] as? [ String : AnyObject ] ,
2323 let remoteSettings = try ? self . remoteJetpackSettingsFromDictionary ( results) else {
2424 failure ( ResponseError . decodingFailure)
2525 return
@@ -38,11 +38,11 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
3838 let endpoint = " jetpack-blogs/ \( siteID) "
3939 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
4040
41- wordPressComRestApi . GET ( path,
41+ wordPressComRESTAPI . get ( path,
4242 parameters: nil ,
43- success: {
44- response, _ in
45- guard let results = response [ " settings " ] as? [ String : AnyObject ] ,
43+ success: { response , _ in
44+ guard let responseDict = response as? [ String : Any ] ,
45+ let results = responseDict [ " settings " ] as? [ String : AnyObject ] ,
4646 let remoteMonitorSettings = try ? self . remoteJetpackMonitorSettingsFromDictionary ( results) else {
4747 failure ( ResponseError . decodingFailure)
4848 return
@@ -61,11 +61,11 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
6161 let endpoint = " sites/ \( siteID) /jetpack/modules "
6262 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
6363
64- wordPressComRestApi . GET ( path,
64+ wordPressComRESTAPI . get ( path,
6565 parameters: nil ,
66- success: {
67- response, _ in
68- guard let modules = response [ " modules " ] as? [ [ String : AnyObject ] ] ,
66+ success: { response , _ in
67+ guard let responseDict = response as? [ String : Any ] ,
68+ let modules = responseDict [ " modules " ] as? [ [ String : AnyObject ] ] ,
6969 let remoteModulesSettings = try ? self . remoteJetpackModulesSettingsFromArray ( modules) else {
7070 failure ( ResponseError . decodingFailure)
7171 return
@@ -94,7 +94,7 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
9494 " body " : jSONBody,
9595 " json " : true ] as [ String : AnyObject ]
9696
97- wordPressComRestApi . POST ( path,
97+ wordPressComRESTAPI . post ( path,
9898 parameters: parameters,
9999 success: {
100100 _, _ in
@@ -113,7 +113,7 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
113113 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
114114 let parameters = dictionaryFromJetpackMonitorSettings ( settings)
115115
116- wordPressComRestApi . POST ( path,
116+ wordPressComRESTAPI . post ( path,
117117 parameters: parameters,
118118 success: {
119119 _, _ in
@@ -131,7 +131,7 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
131131 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
132132 let parameters = [ ModuleOptionKeys . active: active]
133133
134- wordPressComRestApi . POST ( path,
134+ wordPressComRESTAPI . post ( path,
135135 parameters: parameters as [ String : AnyObject ] ,
136136 success: {
137137 _, _ in
@@ -148,7 +148,7 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
148148 let endpoint = " jetpack-blogs/ \( siteID) /mine/delete "
149149 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
150150
151- wordPressComRestApi . POST ( path,
151+ wordPressComRESTAPI . post ( path,
152152 parameters: nil ,
153153 success: {
154154 _, _ in
0 commit comments