Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit b70a073

Browse files
authored
Merge pull request #168 from wordpress-mobile/feature/filter-tldrs-in-domain-suggestions
add a way to ask for `DomainSuggestions` that belong to a specific whitelist of TLDs
2 parents 30b720c + 743f8d7 commit b70a073

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

WordPressKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WordPressKit"
3-
s.version = "4.2.1-beta.1"
3+
s.version = "4.2.1-beta.2"
44
s.summary = "WordPressKit offers a clean and simple WordPress.com and WordPress.org API."
55

66
s.description = <<-DESC

WordPressKit/DomainsServiceRemote.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
3939
case includeWordPressDotCom
4040
case onlyWordPressDotCom
4141
case wordPressDotComAndDotBlogSubdomains
42+
case whitelistedTopLevelDomains([String])
4243

4344
fileprivate func parameters() -> [String: AnyObject] {
4445
switch self {
@@ -54,6 +55,8 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
5455
"vendor": "dot" as AnyObject,
5556
"only_wordpressdotcom": true as AnyObject,
5657
"include_wordpressdotcom": true as AnyObject]
58+
case .whitelistedTopLevelDomains(let whitelistedTLDs):
59+
return ["tlds": whitelistedTLDs.joined(separator: ",") as AnyObject]
5760
}
5861
}
5962
}

0 commit comments

Comments
 (0)