This PR constains the work done to define the necessary protocols and enumerations to start defining remote API service as well as an implementation of the `URLProtocol` to mock requests and responses when using the `URLSession` to make remote calls. To provide further details about this work: - [x] declared the `Communications` library in the `Package` file; - [x] defined the minimum Apple platform versions in the `Package` file to support the async/await feature; - [x] defined the `HTTPRequestMethod` and `HTTPResponseCode` public enumerations; - [x] defined the `Endpoint` and `Client` public protocols; - [x] implemented the internal `MakeURLRequestUseCase` use case; - [x] implemented the `MockURLProtocol` class that mocks requests and responses on `URLSession` instances; - [x] started writing and updating the `README` file. Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Reviewed-on: #4
SwiftLibs
This package contains the core building blocks that we, Röck+Cöde, usually use to build any kind of application written in the Swift programming language.
Libraries
This package contains several libraries which a developer can also use in their own codebase, and these libraries are grouped by a certain concern or purpose.
Currently, this package contains the following libraries:
Communications
: protocols, enumerations and a ready-to-use mock url class to build remote API services;Coordination
: protocols to implement the Coordinator pattern and some ready-to-use platform-specific concrete routers;Core
: extensions we usually add to the base layer functionality and primitive types provided by the Swift standard library;Dependencies
: a ready-to-use, simple Dependency Injection mechanism that levers heavily on the dynamic property wrappers provided by the Swift programming language;
Description
A collection of reusable patterns, protocols, classes, structs, and extensions we have been using in our Swift libraries and applications from some time now, grouped in libraries based on purpose or feature.
https://github.com/rock-n-code/swift-libs.git
api-clientcommunicationscoordinator-patterncore-datadependency-injectionextensionsfoundationswiftswift-pm
Readme
3.3 MiB
Languages
Swift
75.8%
HTML
12.7%
JavaScript
7.6%
Makefile
3.9%