Skip to content

Commit

Permalink
fix: lint documentation
Browse files Browse the repository at this point in the history
Resolves: none.
  • Loading branch information
loay-ashraf committed Jan 27, 2024
1 parent 92e3bbf commit 6f1f25f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
8 changes: 4 additions & 4 deletions Docs.docc/Articles/ConnectingToWebSocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Connect to a web socket server with **RxNetworkKit**

## Overview

In this article we will walk you through on how to connect to a web socket server and how to send/receive messages and data.
In this article we will walk you through on how to connect to a web socket server and how to send/receive messages.

### Creating a http client

Expand Down Expand Up @@ -39,7 +39,7 @@ class ViewController: UIViewController {

### Connecting to a websocket server

In this section, you will create a ``WebSocket`` and send/receive messages and data to/from the server.
In this section, you will create a ``WebSocket`` and send/receive messages to/from the server.

- First, call the `HTTPClient.websocket` method and pass the server url, protocols and close handler as arguments.

Expand Down Expand Up @@ -91,9 +91,9 @@ class ViewController: UIViewController {
}
```

- Optionally, you can send messages and data via the `WebSocket.send(_:)` method.
- Optionally, you can send messages to the server via the `WebSocket.send(_:)` method.

- That's it, you are connected to a web socket server and ready to send/receive messages and data.
- That's it, you are connected to a web socket server and ready to send/receive messages.

- Tip: You can disconnect from the web socket server at any time by calling the `WebSocket.disconnect` method.

Expand Down
8 changes: 0 additions & 8 deletions Examples/iOS/iOS Example/Controller/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ class ViewController: UIViewController {
let restClient = RESTClient(session: session, requestInterceptor: requestInterceptor)
let httpClient = HTTPClient(session: session, requestInterceptor: requestInterceptor)
viewModel = .init(restClient: restClient, httpClient: httpClient)
NetworkReachability.shared.didBecomeReachable
.subscribe(onNext: {
// print that the network became reachable
print("Network did become reachable!")
})
.disposed(by: disposeBag)
NetworkReachability.shared.setInterfaceTypes(NetworkInterfaceType.allCases)
NetworkReachability.shared.start()
}
/// Sets up views.
private func setupUI() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import Foundation

/// An enumeration of the types of events received during a download operation.
public enum HTTPDownloadRequestEvent {
/// The download request has completed with the file saved to the disk.
case completed
/// The download request has completed with the file data.
case completedWithData(data: Data?)
/// The download request has progressed.
case progress(progress: Progress)
}
2 changes: 2 additions & 0 deletions Source/HTTP/Types/Request/Event/HTTPUploadRequestEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Foundation

/// An enumeration of the types of events received during an upload operation.
public enum HTTPUploadRequestEvent<T: Decodable> {
/// The upload request has completed with a response body.
case completed(model: T)
/// The upload request has progressed.
case progress(progress: Progress)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

/// Holds details for a mulipart form upload.
/// Holds details for a mulipart form upload request.
public struct HTTPUploadRequestFormData {

/// parameters (text data fields) to be included in the form HTTP body.
Expand Down

0 comments on commit 6f1f25f

Please sign in to comment.