Skip to content

Commit fb452a5

Browse files
committed
Remove redundant RemoteBlogSettings methods from BlogServiceRemoteREST
1 parent de433d3 commit fb452a5

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

Sources/WordPressKit/Services/BlogServiceRemoteREST.h

-4
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,4 @@ typedef void (^SettingsHandler)(RemoteBlogSettings *settings);
6666
success:(void(^)(NSDictionary *siteInfoDict))success
6767
failure:(void (^)(NSError *error))failure;
6868

69-
// FIXME: Temporary public for testing. Will remove once the logic moves to Swift
70-
- (RemoteBlogSettings *)remoteBlogSettingFromJSONDictionary:(NSDictionary *)json;
71-
- (NSDictionary *)remoteSettingsToDictionary:(RemoteBlogSettings *)settings;
72-
7369
@end

Sources/WordPressKit/Services/BlogServiceRemoteREST.m

+2-12
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ - (void)syncBlogSettingsWithSuccess:(SettingsHandler)success
219219
}
220220
return;
221221
}
222-
RemoteBlogSettings *remoteSettings = [self remoteBlogSettingFromJSONDictionary:responseObject];
222+
RemoteBlogSettings *remoteSettings = [[RemoteBlogSettings alloc] initWithJsonDictionary:responseObject];
223223
if (success) {
224224
success(remoteSettings);
225225
}
@@ -236,7 +236,7 @@ - (void)updateBlogSettings:(RemoteBlogSettings *)settings
236236
{
237237
NSParameterAssert(settings);
238238

239-
NSDictionary *parameters = [self remoteSettingsToDictionary:settings];
239+
NSDictionary *parameters = [settings dictionaryRepresentation];
240240
NSString *path = [NSString stringWithFormat:@"sites/%@/settings?context=edit", self.siteID];
241241
NSString *requestUrl = [self pathForEndpoint:path withVersion:WordPressComRESTAPIVersion_1_1];
242242

@@ -374,14 +374,4 @@ - (RemotePostType *)remotePostTypeWithDictionary:(NSDictionary *)json
374374
return postType;
375375
}
376376

377-
- (RemoteBlogSettings *)remoteBlogSettingFromJSONDictionary:(NSDictionary *)json
378-
{
379-
return [[RemoteBlogSettings alloc] initWithJsonDictionary:json];
380-
}
381-
382-
- (NSDictionary *)remoteSettingsToDictionary:(RemoteBlogSettings *)settings
383-
{
384-
return [settings dictionaryRepresentation];
385-
}
386-
387377
@end

0 commit comments

Comments
 (0)