Skip to content

Commit bb220fd

Browse files
committed
Remove unused functions
1 parent aebe3f9 commit bb220fd

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

WordPress/Classes/Networking/WordPressOrgRestApi+WordPress.swift

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,6 @@
11
import Foundation
22
import WordPressKit
33

4-
private func makeAuthenticator(blog: Blog) -> Authenticator? {
5-
return blog.account != nil
6-
? makeTokenAuthenticator(blog: blog)
7-
: makeCookieNonceAuthenticator(blog: blog)
8-
}
9-
10-
private func makeTokenAuthenticator(blog: Blog) -> Authenticator? {
11-
guard let token = blog.authToken else {
12-
DDLogError("Failed to initialize a .com API client with blog: \(blog)")
13-
return nil
14-
}
15-
return TokenAuthenticator(token: token)
16-
}
17-
18-
private func makeCookieNonceAuthenticator(blog: Blog) -> Authenticator? {
19-
guard let loginURL = try? blog.loginUrl().asURL(),
20-
let adminURL = try? blog.adminUrl(withPath: "").asURL(),
21-
let username = blog.username,
22-
let password = blog.password,
23-
let version = blog.version as String? else {
24-
DDLogError("Failed to initialize a .org API client with blog: \(blog)")
25-
return nil
26-
}
27-
28-
return CookieNonceAuthenticator(username: username, password: password, loginURL: loginURL, adminURL: adminURL, version: version)
29-
}
30-
314
private func apiBase(blog: Blog) -> URL? {
325
guard blog.account == nil else {
336
assertionFailure(".com support has not been implemented yet")

0 commit comments

Comments
 (0)