diff --git a/CHANGELOG.md b/CHANGELOG.md index 15bac984..96f21fdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,10 +36,6 @@ _None._ _None._ -### New Features - -- Add an API in `DomainServiceRemote` to fetch All Domains. [#626] - ### Bug Fixes _None._ @@ -48,6 +44,12 @@ _None._ _None._ +## 8.8.0 + +### New Features + +Add `tag` parameter to `PostServiceRemoteOptions` [#634] + ## 8.7.1 ### Bug Fixes diff --git a/WordPressKit.podspec b/WordPressKit.podspec index 4cba82d2..e86981c9 100644 --- a/WordPressKit.podspec +++ b/WordPressKit.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = 'WordPressKit' - s.version = '8.7.1' + s.version = '8.8.0' s.summary = 'WordPressKit offers a clean and simple WordPress.com and WordPress.org API.' s.description = <<-DESC diff --git a/WordPressKit/PostServiceRemoteOptions.h b/WordPressKit/PostServiceRemoteOptions.h index d568b204..e33cf42e 100644 --- a/WordPressKit/PostServiceRemoteOptions.h +++ b/WordPressKit/PostServiceRemoteOptions.h @@ -77,4 +77,9 @@ typedef NS_ENUM(NSUInteger, PostServiceResultsOrdering) { */ - (NSString *)meta; +/** + The tag to filter by. + */ +- (NSString *)tag; + @end diff --git a/WordPressKit/PostServiceRemoteREST.m b/WordPressKit/PostServiceRemoteREST.m index 7deaca92..d9248e59 100644 --- a/WordPressKit/PostServiceRemoteREST.m +++ b/WordPressKit/PostServiceRemoteREST.m @@ -17,6 +17,7 @@ static NSString * const RemoteOptionKeySearch = @"search"; static NSString * const RemoteOptionKeyAuthor = @"author"; static NSString * const RemoteOptionKeyMeta = @"meta"; +static NSString * const RemoteOptionKeyTag = @"tag"; static NSString * const RemoteOptionValueOrderAscending = @"ASC"; static NSString * const RemoteOptionValueOrderDescending = @"DESC"; @@ -418,7 +419,10 @@ - (NSDictionary *)dictionaryWithRemoteOptions:(id )opt if (options.meta.length > 0) { [remoteParams setObject:options.meta forKey:RemoteOptionKeyMeta]; } - + if (options.tag.length > 0) { + [remoteParams setObject:options.tag forKey:RemoteOptionKeyTag]; + } + return remoteParams.count ? [NSDictionary dictionaryWithDictionary:remoteParams] : nil; }