Skip to content

Commit

Permalink
Merge pull request #23 from allaboutapps/change-access-modifier
Browse files Browse the repository at this point in the history
change access modifier
  • Loading branch information
madlyn authored Oct 25, 2021
2 parents 86e958f + a2b2590 commit dc7dffc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Fetch/Code/Network/APIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public struct NetworkResponse<T> {
}

/// The `APIClient` is the interface to the network and it is used by a `Resource` to send http requests.
public class APIClient {
open class APIClient {

typealias CompletionCallback<T> = ((Swift.Result<NetworkResponse<T>, FetchError>) -> Void)

Expand Down
2 changes: 1 addition & 1 deletion Fetch/Code/Network/Resource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Alamofire
/// A `Resource` represents all data necessary for a network request combined with the decoding of the response.
/// Additionally, caching behaviour can be specified

public class Resource<T: Decodable>: CacheableResource {
open class Resource<T: Decodable>: CacheableResource {

public enum Body {
case encodable(Encodable)
Expand Down
10 changes: 5 additions & 5 deletions Fetch/Code/Utilities/RequestToken.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import Foundation

/// A `RequestToken` can be used to cancel a running network request
public class RequestToken {
internal let onCancel: (() -> Void)
internal var requestTokens = [RequestToken]()
public let onCancel: (() -> Void)
private var requestTokens = [RequestToken]()

/// Indicates if the request is cancelled
public private(set) var isCancelled: Bool = false

internal init(_ onCancel: @escaping (() -> Void) = {}) {
public init(_ onCancel: @escaping (() -> Void) = {}) {
self.onCancel = onCancel
}

/// Appends a `RequestToken` and cancels it if self is already cancelled
internal func append(_ requestToken: RequestToken) {
public func append(_ requestToken: RequestToken) {
requestTokens.append(requestToken)

if isCancelled {
Expand All @@ -30,7 +30,7 @@ public class RequestToken {
}

@discardableResult
internal static func += (lhs: RequestToken, rhs: RequestToken) -> RequestToken {
public static func += (lhs: RequestToken, rhs: RequestToken) -> RequestToken {
lhs.append(rhs)
return lhs
}
Expand Down

0 comments on commit dc7dffc

Please sign in to comment.