Skip to content

Commit

Permalink
Remove docs/ directory since Swift doesn't support combining couple d…
Browse files Browse the repository at this point in the history
…occarchives into one
  • Loading branch information
ale-zai committed Nov 20, 2022
1 parent b81b09a commit 2115ccd
Show file tree
Hide file tree
Showing 543 changed files with 18 additions and 1,015 deletions.
51 changes: 0 additions & 51 deletions DOCBUILD.sh

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -15,7 +15,7 @@ Converters, etc.

### Features

- [x] [Well documented](https://instrumentbox.github.io/Network/documentation/web/)
- [x] [Well documented](https://instrument-box-network-web-docs.netlify.app/documentation/web/)
- [x] Customizable
- [x] Response validation
- [x] Multipart requests
Expand All @@ -26,7 +26,7 @@ Converters, etc.

### Feartures

- [x] [Well documented](https://instrumentbox.github.io/Network/documentation/webcore/)
- [x] [Well documented](https://instrument-box-network-web-core-docs.netlify.app/documentation/webcore/)
- [x] Customizable
- [x] Request authorization
- [x] Certificate and public key pinning
Expand Down
15 changes: 9 additions & 6 deletions Sources/Web/Web.docc/GettingStarted/Installation.md
Expand Up @@ -11,7 +11,7 @@ The *Web* library is available via [Swift Package Manager](https://swift.org/pac
- Go to `File` -> `Add Packages...`
- Type package URL [https://github.com/InstrumentBox/Network](https://github.com/InstrumentBox/Network)
- Select `Network` package, specify dependency rule, and click `Add Package`
- Select `Web` target and click `Add Package`
- Select `Web` and `WebCore` targets and click `Add Package`

##### Linking to a Swift package

Expand All @@ -22,10 +22,13 @@ let package = Package(
...,
dependencies: [
...,
.package(name: "Network", url: "https://github.com/InstrumentBox/Network", .upToNextMajor(from: "2.0.0"))
.package(name: "Network", url: "https://github.com/InstrumentBox/Network", from: "3.0.0")
],
targets: [
.target(..., dependencies: [.product(name: "Web", package: "Network")]
.target(..., dependencies: [
.product(name: "Web", package: "Network"),
.product(name: "WebCore", package: "Network")
]
]
...
)
Expand All @@ -47,10 +50,10 @@ $ git submodule add https://github.com/InstrumentBox/Network.git
- Select `Network` directory
- Next, select your application project in the Project Navigator (blue project icon) to navigate
to the target configuration window and select the application target under the "Targets" heading
in the sidebar.
in the sidebar
- In the tab bar at the top of that window open the "General" panel.
- Click on the `+` button under the "Frameworks, Libraries, and Embedded Content" section.
- Select *Web* library
- Click on the `+` button under the "Frameworks, Libraries, and Embedded Content" section
- Select `Web` and `WebCore` libraries

## Manual Installation

Expand Down
2 changes: 1 addition & 1 deletion Sources/Web/Web.docc/Request/ConvertBody.md
Expand Up @@ -28,7 +28,7 @@ If you need to convert some object that can't be converted by provided converter
your own body converter. Here's the example how you can do this:

```swift
struct MyOwnBodyConverter: ResponseConverter {
struct MyOwnBodyConverter: BodyConverter {
var contentType: String {
// Return appropriate content type here
}
Expand Down
10 changes: 5 additions & 5 deletions Sources/Web/Web.docc/Request/Multipart.md
Expand Up @@ -15,11 +15,11 @@ struct UploadImageRequest: MyAppRequest {
let image: UIImage

func toURLRequest(with baseURL: URL?) throws -> URLRequest {
let bodyParts = try [
BodyPart(name: "my_image", body: image, converter: JPEGImageBodyConverter())
let formDatas = try [
FormData(name: "my_image", body: image, converter: JPEGImageBodyConverter())
]
...
return try URLRequest(..., body: bodyParts, converter: MultipartBodyConverter())
return try URLRequest(..., body: formDatas, converter: MultipartBodyConverter())
}
}
```
Expand All @@ -37,8 +37,8 @@ The *Web* library provides you with the `FormData` protocol so it allows you to
form data. In this case you are responsible to add boundary, headers, and all needed line breaks.

```swift
struct MyFormData: FormData {
func makeFormData(boundary: String) throws -> Data {
struct MyFormData: BodyPart {
func toBodyPartData(with boundary: String) throws -> Data {
// Make form data here
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Web/Web.docc/Response/ConvertResponse.md
Expand Up @@ -32,4 +32,4 @@ struct MyOwnResponseConverter<ConvertedResponse>: ResponseConverter {
}
```

The data to be converted can be accessed via `response.body`
The data to be converted can be accessed via `response.body`.
9 changes: 0 additions & 9 deletions docs/css/documentation-topic.3bca6578.css

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions docs/css/index.12bb178a.css

This file was deleted.

9 changes: 0 additions & 9 deletions docs/css/topic.ee15af52.css

This file was deleted.

9 changes: 0 additions & 9 deletions docs/css/tutorials-overview.06e8bcf7.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/data/documentation/web.json

This file was deleted.

0 comments on commit 2115ccd

Please sign in to comment.