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

Commit ccf5dc4

Browse files
Merge branch 'develop' into master
2 parents 7b3a3cf + 3c02546 commit ccf5dc4

40 files changed

+187
-168
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 = "2.1.0.1"
3+
s.version = "2.1.1-beta.2"
44
s.summary = "WordPressKit offers a clean and simple WordPress.com and WordPress.org API."
55

66
s.description = <<-DESC

WordPressKit.xcodeproj/project.pbxproj

Lines changed: 40 additions & 48 deletions
Large diffs are not rendered by default.

WordPressKit/AccountSettingsRemote.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
123123
})
124124
}
125125

126-
fileprivate func settingsFromResponse(_ responseObject: AnyObject) throws -> AccountSettings {
126+
private func settingsFromResponse(_ responseObject: AnyObject) throws -> AccountSettings {
127127
guard let
128128
response = responseObject as? [String: AnyObject],
129129
let firstName = response["first_name"] as? String,
@@ -158,7 +158,7 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
158158
tracksOptOut: tracksOptOut)
159159
}
160160

161-
fileprivate func fieldNameForChange(_ change: AccountSettingsChange) -> String {
161+
private func fieldNameForChange(_ change: AccountSettingsChange) -> String {
162162
switch change {
163163
case .firstName:
164164
return "first_name"

WordPressKit/GravatarServiceRemote.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ open class GravatarServiceRemote {
9393

9494
/// Returns a new (randomized) Boundary String
9595
///
96-
fileprivate func boundaryForRequest() -> String {
96+
private func boundaryForRequest() -> String {
9797
return "Boundary-" + UUID().uuidString
9898
}
9999

@@ -107,7 +107,7 @@ open class GravatarServiceRemote {
107107
///
108108
/// - Returns: A NSData instance, containing the Request's Payload.
109109
///
110-
fileprivate func bodyWithGravatarData(_ gravatarData: Data, account: String, boundary: String) -> Data {
110+
private func bodyWithGravatarData(_ gravatarData: Data, account: String, boundary: String) -> Data {
111111
let body = NSMutableData()
112112

113113
// Image Payload
@@ -131,7 +131,7 @@ open class GravatarServiceRemote {
131131

132132

133133
// MARK: - Private Structs
134-
fileprivate struct UploadParameters {
134+
private struct UploadParameters {
135135
static let endpointURL = "https://api.gravatar.com/v1/upload-image"
136136
static let HTTPMethod = "POST"
137137
static let contentType = "application/octet-stream"

WordPressKit/HTTPAuthenticationAlertController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ open class HTTPAuthenticationAlertController {
77

88
public typealias AuthenticationHandler = (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
99

10-
fileprivate static var onGoingChallenges = [URLProtectionSpace: [AuthenticationHandler]]()
10+
private static var onGoingChallenges = [URLProtectionSpace: [AuthenticationHandler]]()
1111

1212
static public func controller(for challenge: URLAuthenticationChallenge, handler: @escaping AuthenticationHandler) -> UIAlertController? {
1313
if var handlers = onGoingChallenges[challenge.protectionSpace] {
@@ -35,7 +35,7 @@ open class HTTPAuthenticationAlertController {
3535
onGoingChallenges.removeValue(forKey: challenge.protectionSpace)
3636
}
3737

38-
static fileprivate func controllerForServerTrustChallenge(_ challenge: URLAuthenticationChallenge) -> UIAlertController {
38+
private static func controllerForServerTrustChallenge(_ challenge: URLAuthenticationChallenge) -> UIAlertController {
3939
let title = NSLocalizedString("Certificate error", comment: "Popup title for wrong SSL certificate.")
4040
let message = String(format: NSLocalizedString("The certificate for this server is invalid. You might be connecting to a server that is pretending to be “%@” which could put your confidential information at risk.\n\nWould you like to trust the certificate anyway?", comment: ""), challenge.protectionSpace.host)
4141
let controller = UIAlertController(title: title, message: message, preferredStyle: .alert)
@@ -58,7 +58,7 @@ open class HTTPAuthenticationAlertController {
5858
return controller
5959
}
6060

61-
static fileprivate func controllerForUserAuthenticationChallenge(_ challenge: URLAuthenticationChallenge) -> UIAlertController {
61+
private static func controllerForUserAuthenticationChallenge(_ challenge: URLAuthenticationChallenge) -> UIAlertController {
6262
let title = String(format: NSLocalizedString("Authentication required for host: %@", comment: "Popup title to ask for user credentials."), challenge.protectionSpace.host)
6363
let message = NSLocalizedString("Please enter your credentials", comment: "Popup message to ask for user credentials (fields shown below).")
6464
let controller = UIAlertController(title: title,

WordPressKit/Insights/StatsAllTimesInsight.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ public struct StatsAllTimesInsight {
77
}
88

99

10-
extension StatsAllTimesInsight: InsightProtocol {
10+
extension StatsAllTimesInsight: StatsInsightData {
1111

12-
//MARK: - InsightProtocol Conformance
12+
//MARK: - StatsInsightData Conformance
1313
public init?(jsonDictionary: [String: AnyObject]) {
1414
guard
1515
let statsDict = jsonDictionary["stats"] as? [String: AnyObject],

WordPressKit/Insights/StatsAnnualAndMostPopularTimeInsight.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public struct StatsAnnualAndMostPopularTimeInsight {
2424
public let annualInsightsAverageImagesCount: Double
2525
}
2626

27-
extension StatsAnnualAndMostPopularTimeInsight: InsightProtocol {
27+
extension StatsAnnualAndMostPopularTimeInsight: StatsInsightData {
2828
public static var pathComponent: String {
2929
return "stats/insights"
3030
}

WordPressKit/Insights/StatsCommentsInsight.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ public struct StatsCommentsInsight {
33
public let topAuthors: [StatsTopCommentsAuthor]
44
}
55

6-
extension StatsCommentsInsight: InsightProtocol {
6+
extension StatsCommentsInsight: StatsInsightData {
77

8-
//MARK: - InsightProtocol Conformance
8+
//MARK: - StatsInsightData Conformance
99
public static var pathComponent: String {
1010
return "stats/comments"
1111
}

WordPressKit/Insights/StatsDotComFollowersInsight.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ public struct StatsDotComFollowersInsight {
33
public let topDotComFollowers: [StatsFollower]
44
}
55

6-
extension StatsDotComFollowersInsight: InsightProtocol {
6+
extension StatsDotComFollowersInsight: StatsInsightData {
77

8-
//MARK: - InsightProtocol Conformance
8+
//MARK: - StatsInsightData Conformance
99
public static var queryProperties: [String: String] {
1010
return ["type": "wpcom",
1111
"max": "7"]

WordPressKit/Insights/StatsEmailFollowersInsight.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ public struct StatsEmailFollowersInsight {
33
public let topEmailFollowers: [StatsFollower]
44
}
55

6-
extension StatsEmailFollowersInsight: InsightProtocol {
6+
extension StatsEmailFollowersInsight: StatsInsightData {
77

8-
//MARK: - InsightProtocol Conformance
8+
//MARK: - StatsInsightData Conformance
99
public static var queryProperties: [String: String] {
1010
return ["type": "email",
1111
"max": "7"]

0 commit comments

Comments
 (0)