-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improving docs of main types
- Loading branch information
Showing
9 changed files
with
92 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ gravatarImageView.gravatar.setImage(email: "[email protected]") | |
``` | ||
|
||
For more info check: | ||
- ``GravatarWrapper/setImage(email:placeholder:rating:preferredSize:options:completionHandler:)`` | ||
- ``GravatarWrapper/setImage(email:placeholder:rating:preferredSize:defaultImage:options:completionHandler:)`` | ||
|
||
## Featured | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
import Foundation | ||
|
||
/// A `HTTPClient` is used to perform basic networking operations. | ||
/// | ||
/// You can provide your own type conforming to this protocol to gain control over all networking operations performed internally by this SDK. | ||
/// For more info, see ``ImageService/init(client:cache:)`` and ``ProfileService/init(client:)``. | ||
public protocol HTTPClient { | ||
/// Performs a data request using the information provided, and delivers the result asynchronously. | ||
/// - Parameter request: A URL request object that provides request-specific information such as the URL and cache policy. | ||
/// - Returns: An asynchronously-delivered tuple that contains the URL contents as a Data instance, and a HTTPURLResponse. | ||
func fetchData(with request: URLRequest) async throws -> (Data, HTTPURLResponse) | ||
|
||
/// Uploads data to a URL based on the specified URL request and delivers the result asynchronously. | ||
/// - Parameters: | ||
/// - request: A URL request object that provides request-specific information such as the URL and cache policy. | ||
/// - data: The data to be uploaded. | ||
/// - Returns: An asynchronously-delivered instance of the returned HTTPURLResponse. | ||
func uploadData(with request: URLRequest, data: Data) async throws -> HTTPURLResponse | ||
|
||
// TODO: document after change. | ||
func fetchObject<T: Decodable>(from path: String) async throws -> T | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters