File tree 3 files changed +8
-9
lines changed 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ let package = Package(
11
11
targets: [
12
12
. binaryTarget(
13
13
name: " WordPressKit " ,
14
- url: " https://github.com/user-attachments/files/19034191 /WordPressKit.zip " ,
15
- checksum: " 34f108cba86b5e4334d1c9af79946dbb8b665e270bdd14bc8f7bc0ba7a898583 "
14
+ url: " https://github.com/user-attachments/files/19303444 /WordPressKit.zip " ,
15
+ checksum: " 5b97e0e3fc27bb5f99e208de4762fd4603da52fe2f108c4eeea2e0e7e681a527 "
16
16
) ,
17
17
]
18
18
)
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ import Foundation
58
58
/// Blog's total disk quota space used.
59
59
public var quotaSpaceUsed : NSNumber ?
60
60
61
+ public var isDeleted : Bool
62
+
61
63
/// Parses details from a JSON dictionary, as returned by the WordPress.com REST API.
62
64
@objc ( initWithJSONDictionary: )
63
65
public init ( jsonDictionary json: NSDictionary ) {
@@ -79,6 +81,7 @@ import Foundation
79
81
self . planActiveFeatures = ( json. array ( forKeyPath: " plan.features.active " ) as? [ String ] ) ?? [ ]
80
82
self . quotaSpaceAllowed = json. number ( forKeyPath: " quota.space_allowed " )
81
83
self . quotaSpaceUsed = json. number ( forKeyPath: " quota.space_used " )
84
+ self . isDeleted = json. number ( forKey: " is_deleted " ) ? . boolValue == true
82
85
}
83
86
84
87
}
Original file line number Diff line number Diff line change @@ -354,11 +354,6 @@ - (void)getBlogsWithParameters:(NSDictionary *)parameters
354
354
{
355
355
NSString *requestUrl = [self pathForEndpoint: @" me/sites"
356
356
withVersion: WordPressComRESTAPIVersion_1_2];
357
- if (parameters[@" site_visibility" ] == nil ) {
358
- NSMutableDictionary *another = [parameters mutableCopy ];
359
- another[@" site_visibility" ] = @" visible" ;
360
- parameters = another;
361
- }
362
357
[self .wordPressComRESTAPI get: requestUrl
363
358
parameters: parameters
364
359
success: ^(id responseObject, NSHTTPURLResponse *httpResponse) {
@@ -390,10 +385,11 @@ - (RemoteUser *)remoteUserFromDictionary:(NSDictionary *)dictionary
390
385
- (NSArray *)remoteBlogsFromJSONArray : (NSArray *)jsonBlogs
391
386
{
392
387
NSArray *blogs = jsonBlogs;
393
- return [blogs wpkit_map: ^id (NSDictionary *jsonBlog) {
388
+ return [[ blogs wpkit_map: ^id (NSDictionary *jsonBlog) {
394
389
return [[RemoteBlog alloc ] initWithJSONDictionary: jsonBlog];
390
+ }] wpkit_filter: ^BOOL (RemoteBlog *blog) {
391
+ return !blog.isDeleted ;
395
392
}];
396
- return blogs;
397
393
}
398
394
399
395
@end
You can’t perform that action at this time.
0 commit comments