From b43fc731b10bb865f14517a600a24dc06e7c9e67 Mon Sep 17 00:00:00 2001 From: kean Date: Tue, 17 Oct 2023 10:47:02 -0400 Subject: [PATCH 1/2] Add tag parameter to /posts --- CHANGELOG.md | 1 + WordPressKit/PostServiceRemoteOptions.h | 5 +++++ WordPressKit/PostServiceRemoteREST.m | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a178f8a2..96dffa23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ _None._ ### New Features - `RemotePostCategory.parent` is set to zero when API returns `"parent": null` [#630] +- Add `tag` parameter to `PostServiceRemoteOptions` [#634] ### Bug Fixes 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; } From 1fe35d5419f2320624a475118b380c14680fbc99 Mon Sep 17 00:00:00 2001 From: kean Date: Wed, 25 Oct 2023 12:47:58 -0400 Subject: [PATCH 2/2] Version 8.8.0 --- WordPressKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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