Skip to content

Commit d6133ec

Browse files
committed
Update README.md
1 parent aad6553 commit d6133ec

3 files changed

Lines changed: 34 additions & 32 deletions

File tree

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
</p>
1313

1414
## Description
15-
`network-layer` description.
15+
`network-layer` is a library for network communication.
1616

1717
- [Usage](#usage)
18+
- [Documentation](#documentation)
1819
- [Requirements](#requirements)
1920
- [Installation](#installation)
2021
- [Communication](#communication)
@@ -24,7 +25,37 @@
2425

2526
## Usage
2627

28+
```swift
29+
import NetworkLayer
30+
import NetworkLayerInterfaces
31+
32+
struct Request: IRequest {
33+
var domainName: String {
34+
"https://example.com"
35+
}
36+
37+
var path: String {
38+
"user"
39+
}
40+
41+
var httpMethod: HTTPMethod {
42+
.get
43+
}
44+
}
45+
46+
let request = Request()
47+
let requestProcessor = NetworkLayerAssembly().assemble()
48+
let user: User = try await requestProcessor.send(request)
49+
```
50+
51+
## Documentation
52+
53+
Check out [network-layer documentation](https://github.com/space-code/network-layer/blob/main/Sources/NetworkLayer/NetworkLayer.docc/NetworkLayer.md).
54+
2755
## Requirements
56+
- iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 7.0+ / visionOS 1.0+
57+
- Xcode 14.0
58+
- Swift 5.7
2859

2960
## Installation
3061
### Swift Package Manager

Sources/NetworkLayer/NetworkLayer.docc/Articles/GettingStarted.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@ do {
7474
}
7575

7676
```
77+

Sources/NetworkLayer/NetworkLayer.docc/NetworkLayer.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,4 @@ network-layer is available under the MIT license. See the LICENSE file for more
2727

2828
- <doc:GettingStarted>
2929
- <doc:Authentication>
30-
- <doc:Retry>
31-
32-
<!--### Network Layer Creation-->
33-
<!---->
34-
<!--- ``INetworkLayerAssembly``-->
35-
<!---->
36-
<!--### Request and Response Models-->
37-
<!---->
38-
<!--- ``Configuration``-->
39-
<!--- ``HTTPMethod``-->
40-
<!--- ``RequestBody``-->
41-
<!--- ``IRequest``-->
42-
<!--- ``Response``-->
43-
<!---->
44-
<!--### Errors-->
45-
<!---->
46-
<!--- ``NetworkLayerError``-->
47-
<!--- ``AuthenticatorInterceptorError``-->
48-
<!---->
49-
<!--### Authentication-->
50-
<!---->
51-
<!--- ``IAuthenticationCredential``-->
52-
<!--- ``IAuthenticationInterceptor``-->
53-
<!--- ``IAuthenticator``-->
54-
<!---->
55-
<!--### Services-->
56-
<!---->
57-
<!--- ``IDataRequestHandler``-->
58-
<!--- ``IRequestBuilder``-->
59-
<!--- ``IRequestProcessor``-->
60-
<!--- ``RequestProcessorDelegate``-->
30+
- <doc:Retry

0 commit comments

Comments
 (0)