Skip to content

Commit

Permalink
v1.0.0 (#65)
Browse files Browse the repository at this point in the history
* feat: add decoding capability in case of failure caused due to HTTP status code

Resolves: none.

* feat: override User-Agent HTTP header in session configuration (#26)

Resolves: none.

* Add macOS example (#27)

* feat: move iOS example project into new sub folder

Resolves: none.

* fix: update framework search paths

Resolves: none.

* feat: add empt macOS example project to workspace

Resolves: none.

* fix: update framework scheme name

Resolves: none.

* feat: add files to macOS example directory

Resolves: none.

* fix: apply public access modifier to DefaultHTTPErrorBody and DefaultNetworkAPIError

Resolves: none.

* refactor: add description comment for ProcessInfo extension

Resolves: none.

* fix: add RxNetworkKit bridging header reference

Resolves: none.

* refactor: apply project recommended settings

Resolves: none.

* feat: connect viewModel to tableview UI

Resolves: none.

* feat: complete ViewController class in macOS Example

Resolves: none.

* refactor: remove old un-needed file

Resolves: none.

* fix: apply correct image scale for error view

Resolves: none.

* Apply new version (0.0.2) (#28)

* fix: remove tinted button warning

Resolves: none.

* version: 0.0.2

Resolves: none.

* fix: update version for podSpec file

Resolves: none.

* fix: remove RxDataSources import statement (#31)

Resolves: none.

* Add CI Workflows For Repository (#33)

* feat: add iOS workflow

Resolves: none.

* fix: update build-ios.yml

Resolves: none.

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Create build-macos.yml

* Update build-ios.yml + build-macos.yml

* fix error 65

* Update build-ios.yml

* update build-ios.yml + build-macos.yml

* Update build-macos.yml

* Update project.pbxproj

* add publish-podspec.yml

* add workflow files outside of folders

* Update publish-podspec.yml

* Update publish-podspec.yml

* Update publish-podspec.yml

* Create pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* test container workflow

* Update build.yml

* Update build.yml

* add some changes

* Update build.yml

* add some changes

* Update build.yml

* refactor: update names + remove comments

Resolves: none.

* add trigger for trunk push workflow

* add dummy project to test SPM integration

* add spm-lint.yml

* Update spm-lint.yml

* Update spm-lint.yml

* Update spm-lint.yml

* Update spm-lint.yml

* update dummy project

* update workspace dependencies versions

* Update CI Workflows

* update CI workflows

* Update CI Workflow

* Update Dependency Version Rules (#45)

* fix: update version rules for SPM to upToNextMajor

Resolves: none.

* fix: update version rule for SPM in iOS Example project

Resolves: none.

* fix: update version rules for cocoapods in podspec file

Resolves: none.

* feat: add WebSocket capability to NetworkManager (#46)

Resolves: none.

* fix a typo

* update dependencies versions

Resolves: none.

* update Package.swift + podspec file

* change xcode version used in CI/CD to 14.3.1

Resolves: none.

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update build.yml

* Update build.yml

* update workflow files

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-trunk-push.yml

* Update spm-lint.yml

* Update build-macos.yml

* update Xcode version to 15.0.0 for CI workflows

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* Update pod-lib-lint.yml

* break: drop support for Cocoapods (cannot work with Xcode 15)

Resolves: none.

* [49][DocC][Update Documentation] (#50)

* feat: update overview for classes, structs, enums, typaliases and protocols

Resolves: none.

* feat: add docs catalog

Resolves: none.

* update CI workflows to build docs

Resolves: none.

* update CI workflows

Resolves: none.

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* Update build-ios.yml

* fix: update corrupt ci workflow file

Resolves: none.

* Delete build-deploy-docs1.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* update CI workflows

* Update build.yml

* Update build-ios.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update build-deploy-docs.yml

* Update websocket error handling (#58)

* feature: bind send and ping errors to the error relay in WebSocket object

Resolves: none.

* fix: capture weak reference to self to avoid retain cycle in example viewModel

Resolves: none.

* feat: add WebSocketError

Resolves: none.

* Update NetworkManager.md

* Update build.yml

* Rename Types and Organize Project files (#61)

* feat: sort files by name inside Source folder

Resolves: none.

* feat: restructure framework project

Resolves: none.

* feat: update docs

Resolves: none.

* feat: update docs

Resolves: none.

* feat: update examples

Resolves: none.

* feat: update docs

Resolves: none.

* feat: move common http types to separate framework

Resolves: none.

* update ci

* update ci

* feat: add CoreHTTP as swift package

Resolves: none.

* Update Package.swift

* feat: add CoreHTTP as a remote Swift Package

Resolves: none.

* Update Package.swift

* Update Package.swift

* feat: update docs

Resolves: none.

* Update build-macos.yml

* Update build-macos.yml

* feat: add CoreExample framework

Resolves: none.

* feat: add CoreExample as a dependency

Resolves: none.

* feat: add CoreExample to macOS Example

Resolves: none.

* fix: update code signing for framework

Resolves: none.

* Update build-macos.yml

* Update build-macos.yml

* update frameworks flow

* Update build-ios.yml

* Update Package.resolved

* Update project.pbxproj

* Update project.pbxproj

* Update build-ios.yml

* update dependencies

* feat: add Session object that can be shared between RESTClient and HTTPClient

Resolves: none.

* refactor: remove reference to event monitor in RESTClient and HTTPClient

Resolves: none.

* feat: update ci workflows

Resolves: none.

* feat: update documentation

Resolves: none.

* Update build.yml

* Update build.yml

* feat: bump Xcode version to 15.1.0 for workflow files

Resolves: none.

* Feature/add watch os example (#62)

* feat: add watch os example

Resolves: none.

* Update ViewController.swift

* Update build.yml

* Update build-watchos.yml

* Update build-watchos.yml

* Update README.md

* Update README.md

* Update README.md

* feat: bump product version to 1.0.0

Resolves: none.

* fix: silence warnings

Resolves: none.

* feat: add watchOS platform to package manifest + sort files

Resolves: none.

* Feature/add tvos support (#63)

* feat: add tvOS support + example

Resolves: none.

* Update build.yml

* Update build.yml

* Update build-tvos.yml

* feat: update documentation

Resolves: none.

* Update README.md

* feat: update Dummy project used to verify SPM

Resolves: none.

* fix: update README.md + add missing initializers

Resolves: none.

* Update RxNetworkKit.md

* Update spm-lint.yml
  • Loading branch information
loay-ashraf authored Jan 10, 2024
1 parent 05d7d8d commit e365170
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 20 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/spm-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
destination: ['generic/platform=iOS Simulator',
'generic/platform=iOS',
'generic/platform=macOS',
'generic/platform=tvOS Simulator',
'generic/platform=tvOS']
'generic/platform=tvOS Simulator']
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
Expand Down
4 changes: 2 additions & 2 deletions Docs.docc/Pages/RxNetworkKit.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ It makes use of RxSwift's traits at request level to acheive a high level of spe
- ``HTTPScheme``
- ``HTTPMethod``
- ``HTTPStatusCode``
- ``HTTPBodyError``
- ``DefaultHTTPBodyError``

### Error

- ``HTTPError``
- ``HTTPAPIError``
- ``DefaultHTTPAPIError``
- ``HTTPBodyError``
- ``DefaultHTTPBodyError``
- ``HTTPClientError``
- ``HTTPServerError``

Expand Down
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ It makes use of RxSwift's traits at request level to acheive a high level of spe
### Simple API Call:

```
// Create 'Network Manager' instance.
let manager = NetworkManager(configuration: .default, requestInterceptor: self, eventMonitor: self)
// Create request router object.
// Create `Session` instance.
let session = Session(configuration: .default, eventMonitor: self)
// Create 'RESTClient' instance.
let restClient = RESTClient(session: session, requestInterceptor: self)
// Create `RequestRouter` instance.
let router = Router.default
// Make request observable sequence using request router.
let single: Single<Model> = manager.request(router)
let single: Single<Model> = restClient.request(router)
// Subscrible to sequence and observe events.
single
.observe(on: MainScheduler.instance)
Expand All @@ -54,12 +56,14 @@ single
### Download Request:

```
// Create 'Network Manager' instance.
let manager = NetworkManager(configuration: .default, requestInterceptor: self, eventMonitor: self)
// Create download request router object.
// Create `Session` instance.
let session = Session(configuration: .default, eventMonitor: self)
// Create 'HTTPClient' instance.
let httpClient = HTTPClient(session: session, requestInterceptor: self)
// Create `HTTPDownloadRequestRouter` instance.
let router = DownloadRouter.default
// Make download request observable sequence using request router.
let downloadObservable: Observable<DownloadEvent> = manager.download(router)
let downloadObservable: Observable<HTTPDownloadRequestEvent> = httpClient.download(router)
// Subscrible to sequence and observe events.
downloadObservable
.observe(on: MainScheduler.instance)
Expand All @@ -83,15 +87,17 @@ downloadObservable
### Upload Request:

```
// Create 'Network Manager' instance.
let manager = NetworkManager(configuration: .default, requestInterceptor: self, eventMonitor: self)
// Create upload request router object.
// Create `Session` instance.
let session = Session(configuration: .default, eventMonitor: self)
// Create 'HTTPClient' instance.
let httpClient = HTTPClient(session: session, requestInterceptor: self)
// Create `HTTPUploadRequestRouter` instance.
let router = UploadRouter.default
// Make 'UploadFile' object.
// Make 'HTTPUploadRequestFile' instance.
let fileData = Data()
guard let file = UploadFile(forKey: UUID().uuidString, withName: "testFile.txt", withData: fileData) else { return }
// Make upload request observable sequence using request router and uploa file object.
let uploadObservable: Observable<UploadEvent<UploadModel>> = manager.upload(router, file)
// Make upload request observable sequence using request router and upload file object.
let uploadObservable: Observable<HTTPUploadRequestEvent<UploadModel>> = httpClient.upload(router, file)
// Subscrible to sequence and observe events.
uploadObservable
.observe(on: MainScheduler.instance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public struct HTTPUploadRequestFile {
/// - key: file key or id.
/// - name: file name.
/// - data: `Data` object for file.
init?(forKey key: String, withName name: String, withData data: Data) {
public init?(forKey key: String, withName name: String, withData data: Data) {
self.key = key
self.name = name
self.url = nil
Expand All @@ -41,7 +41,7 @@ public struct HTTPUploadRequestFile {
/// - Parameters:
/// - key: file key or id.
/// - url: local `URL` for the file.
init?(forKey key: String, withURL url: URL) {
public init?(forKey key: String, withURL url: URL) {
let name = url.lastPathComponent
self.key = key
self.name = name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,14 @@ public struct HTTPUploadRequestFormData {
/// files to be included in the form HTTP body.
let files: [HTTPUploadRequestFile]

/// Creates `HTTPUploadRequestFormData` instance.
///
/// - Parameters:
/// - parameters: `[String: String]` parameters (text data fields) to be included in the form HTTP body.
/// - files: `[HTTPUploadRequestFile]` files to be included in the form HTTP body.
public init(parameters: [String: String], files: [HTTPUploadRequestFile]) {
self.parameters = parameters
self.files = files
}

}

0 comments on commit e365170

Please sign in to comment.