-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from futuredapp/housekeep/inline-documentation…
…-1-2-3-rev2 Inline documentation
- Loading branch information
Showing
15 changed files
with
247 additions
and
28 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 |
---|---|---|
@@ -1,7 +1,12 @@ | ||
name: Test – macOS | ||
|
||
on: | ||
- pull_request | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
test: | ||
|
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
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,8 +1,30 @@ | ||
/// `Server` is an abstraction rather than a protocol-bound requirement. | ||
/// | ||
/// The expectation of a `Server` conforming type is, that it provides a gateway to an API over HTTP. Conforming | ||
/// type should also have the ability to encode/decode data into requests and responses using the `Codable` | ||
/// conformances and strongly typed coding of the Swift language. | ||
/// | ||
/// Conforming type must specify the type representing a request like `Foundation.URLRequest` or | ||
/// `Alamofire.Request`. However, conforming type is expected to have the ability to execute the request too. | ||
/// | ||
/// The `FTAPIKit` provides a standard implementation tailored for `Foundation.URLSession` and | ||
/// `Foundation` JSON coders. The standard implementation is represented by `protocol URLServer`. | ||
public protocol Server { | ||
/// The type representing a `Request` of the network library, like `Foundation.URLRequest` or | ||
/// `Alamofire.Request`. | ||
associatedtype Request | ||
|
||
/// The instance providing strongly typed decoding. | ||
var decoding: Decoding { get } | ||
|
||
/// The instance providing strongly typed encoding. | ||
var encoding: Encoding { get } | ||
|
||
/// Takes a Swift description of an endpoint call and transforms it into a valid request. The reason why | ||
/// the function returns the request to the user is so the user is able to modify the request before executing. | ||
/// This is useful in cases when the API uses OAuth or some other token-based authorization, where | ||
/// the request may be delayed before the valid tokens are received. | ||
/// - Parameter endpoint: An instance of an endpoint representing a call. | ||
/// - Returns: A valid request. | ||
func buildRequest(endpoint: Endpoint) throws -> Request | ||
} |
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
Oops, something went wrong.