@@ -32,7 +32,7 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
3232 let parameters = [ " context " : " edit " ]
3333 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
3434
35- wordPressComRestApi . GET ( path,
35+ wordPressComRESTAPI . get ( path,
3636 parameters: parameters as [ String : AnyObject ] ? ,
3737 success: {
3838 responseObject, _ in
@@ -54,7 +54,7 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
5454 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
5555 let parameters = [ fieldNameForChange ( change) : change. stringValue]
5656
57- wordPressComRestApi . POST ( path,
57+ wordPressComRESTAPI . post ( path,
5858 parameters: parameters as [ String : AnyObject ] ? ,
5959 success: {
6060 _, _ in
@@ -79,7 +79,7 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
7979
8080 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
8181
82- wordPressComRestApi . POST ( path,
82+ wordPressComRESTAPI . post ( path,
8383 parameters: parameters as [ String : AnyObject ] ? ,
8484 success: { _, _ in
8585 success ( )
@@ -99,7 +99,7 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
9999 let endpoint = " me/username/validate/ \( username) "
100100 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
101101
102- wordPressComRestApi . GET ( path,
102+ wordPressComRESTAPI . get ( path,
103103 parameters: nil ,
104104 success: { _, _ in
105105 // The success block needs to be changed if
@@ -116,7 +116,7 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
116116 let endpoint = " wpcom/v2/users/username/suggestions "
117117 let parameters = [ " name " : base]
118118
119- wordPressComRestApi . GET ( endpoint, parameters: parameters as [ String : AnyObject ] ? , success: { ( responseObject, _) in
119+ wordPressComRESTAPI . get ( endpoint, parameters: parameters as [ String : AnyObject ] ? , success: { ( responseObject, _) in
120120 guard let response = responseObject as? [ String : AnyObject ] ,
121121 let suggestions = response [ " suggestions " ] as? [ String ] else {
122122 finished ( [ ] )
@@ -134,7 +134,7 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
134134 let path = self . path ( forEndpoint: endpoint, withVersion: . _1_1)
135135 let parameters = [ " password " : password]
136136
137- wordPressComRestApi . POST ( path,
137+ wordPressComRESTAPI . post ( path,
138138 parameters: parameters as [ String : AnyObject ] ? ,
139139 success: {
140140 _, _ in
@@ -149,14 +149,14 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
149149 let endpoint = " me/account/close "
150150 let path = path ( forEndpoint: endpoint, withVersion: . _1_1)
151151
152- wordPressComRestApi . POST ( path, parameters: nil ) { _, _ in
152+ wordPressComRESTAPI . post ( path, parameters: nil ) { _, _ in
153153 success ( )
154154 } failure: { error, _ in
155155 failure ( error)
156156 }
157157 }
158158
159- private func settingsFromResponse( _ responseObject: AnyObject ) throws -> AccountSettings {
159+ private func settingsFromResponse( _ responseObject: Any ) throws -> AccountSettings {
160160 guard let response = responseObject as? [ String : AnyObject ] ,
161161 let firstName = response [ " first_name " ] as? String ,
162162 let lastName = response [ " last_name " ] as? String ,
0 commit comments