File tree Expand file tree Collapse file tree 3 files changed +4
-13
lines changed
Sources/WordPressKit/Services
Tests/WordPressKitTests/Tests Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,13 @@ typedef void(^ThemeServiceRemoteFailureBlock)(NSError *error);
60
60
*
61
61
* @param freeOnly Only fetch free themes, if false all WP themes will be returned
62
62
* @param page Results page to return.
63
- * @param search Search term to filter themes. Can be nil or empty string.
64
63
* @param success The success handler. Can be nil.
65
64
* @param failure The failure handler. Can be nil.
66
65
*
67
66
* @returns A progress object that can be used to track progress and/or cancel the task
68
67
*/
69
68
- (NSProgress *)getWPThemesPage : (NSInteger )page
70
69
freeOnly : (BOOL )freeOnly
71
- search : (NSString *)search
72
70
success : (ThemeServiceRemoteThemesRequestSuccessBlock)success
73
71
failure : (ThemeServiceRemoteFailureBlock)failure ;
74
72
Original file line number Diff line number Diff line change @@ -99,7 +99,6 @@ - (NSProgress *)getThemeId:(NSString*)themeId
99
99
100
100
- (NSProgress *)getWPThemesPage : (NSInteger )page
101
101
freeOnly : (BOOL )freeOnly
102
- search : (NSString *)search
103
102
success : (ThemeServiceRemoteThemesRequestSuccessBlock)success
104
103
failure : (ThemeServiceRemoteFailureBlock)failure
105
104
{
@@ -108,15 +107,10 @@ - (NSProgress *)getWPThemesPage:(NSInteger)page
108
107
NSString *requestUrl = [self pathForEndpoint: @" themes"
109
108
withVersion: WordPressComRESTAPIVersion_1_2];
110
109
111
- NSMutableDictionary *parameters = [@{
112
- ThemeRequestTierKey: freeOnly ? ThemeRequestTierFreeValue : ThemeRequestTierAllValue,
113
- ThemeRequestNumberKey: @(ThemeRequestNumberValue),
114
- ThemeRequestPageKey: @(page)
115
- } mutableCopy];
116
-
117
- if (search && search.length > 0 ) {
118
- parameters[@" search" ] = search;
119
- }
110
+ NSDictionary *parameters = @{ThemeRequestTierKey: freeOnly ? ThemeRequestTierFreeValue : ThemeRequestTierAllValue,
111
+ ThemeRequestNumberKey: @(ThemeRequestNumberValue),
112
+ ThemeRequestPageKey: @(page),
113
+ };
120
114
121
115
return [self getThemesWithRequestUrl: requestUrl
122
116
page: page
Original file line number Diff line number Diff line change @@ -225,7 +225,6 @@ - (void)testThatGetThemesWorks
225
225
226
226
XCTAssertNoThrow ([service getWPThemesPage: 1
227
227
freeOnly: NO
228
- search: nil
229
228
success: successBlock
230
229
failure: nil ]);
231
230
}
You can’t perform that action at this time.
0 commit comments