Skip to content

Commit

Permalink
v2.0.0 (Update README.md) (#74)
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

* fix: update ci file + remove typo

Resolves: none.

* Feature/add request logging (#67)

* feat: add HTTPRequestLogger and SessionConfiguration

Resolves: none.

* fix: update examples

Resolves: none.

* feat: remove un-needed files + update RequestRouter

Resolves: none

* Update Package.resolved

* Update README.md

* feat: update documentation

Resolves: none.

* feat: bump versions to 2.0.0

Resolves: none.

* Update Package.swift

* Update SessionConfiguration.swift

* Feature/add documentation articles (#72)

* feat: add Getting Started article.

Resolves: none.

* Update GettingStarted.md

* feat: add making first request article

Resolves: none.

* feat: add articles for download and upload requests

Resolves: none.

* feat: add web socket article

Resolves: none.

* feat: add monitoring reachability article

Resolves: none.

* fix: lint documentation

Resolves: none.

* fix: remove un-needed files + update outdated readme file

Resolves: none.
  • Loading branch information
loay-ashraf committed Jan 27, 2024
1 parent ff37cfc commit 729ea3e
Showing 1 changed file with 2 additions and 106 deletions.
108 changes: 2 additions & 106 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,113 +9,9 @@
[![Twitter](https://img.shields.io/badge/Twitter-%40lashraf96-blue)](https://twitter.com/lashraf96)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-loay--ashraf-blue)](https://linkedin.com/in/loay-ashraf)

RxNetworkKit is a lightweight FRP networking framework.
RxNetworkKit is a generic reactive networking framework that leverages the stability and reliability of both Apple's [URLSession](https://developer.apple.com/documentation/foundation/urlsession) and [RxSwift](https://github.com/ReactiveX/RxSwift).

Built on top of Apple's [URLSession](https://developer.apple.com/documentation/foundation/urlsession) and uses the well-known [RxSwift](https://github.com/ReactiveX/RxSwift) FRP library.

## Why RxNetworkKit?

RxNetworkKit fits nicely on your project if you use RxSwift and RxCocoa mainly in your project.

It makes use of RxSwift's traits at request level to acheive a high level of specialization for observed request sequence and expected output from it.

### Full of Goodies:

- includes download and upload capabillity with progress tracking all within the same observable sequence. cool, right?
- includes a request interceptor protocol that can be implemented for request adaptation and retry on failure.
- comes with a reachability class that you can observe from anywhere for reachability status.

## Practical Examples

### Simple API Call:

```
// Create `Session` instance.
let session = Session(configuration: .default)
// Create 'RESTClient' instance.
let restClient = RESTClient(session: session, requestInterceptor: self)
// Create `HTTPRequestRouter` instance.
let router = Router.default
// Make request observable sequence using request router.
let single: Single<Model> = restClient.request(router)
// Subscrible to sequence and observe events.
single
.observe(on: MainScheduler.instance)
.subscribe(onSuccess: {
print("Task Response: \($0)")
print("Task Completed!")
}, onFailure: {
print("Task Failure: \($0.localizedDescription)")
}, onDisposed: {
print("Subscription is disposed!")
})
// Dispose subscription by dispose bag.
.disposed(by: disposeBag)
```

### Download Request:

```
// Create `Session` instance.
let session = Session(configuration: .default)
// 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<HTTPDownloadRequestEvent> = httpClient.download(router)
// Subscrible to sequence and observe events.
downloadObservable
.observe(on: MainScheduler.instance)
.subscribe(onNext: {
switch $0 {
case .progress(let progress):
print("Download Task Progress: \(progress.fractionCompleted*100)%")
case .completedWithData(let data):
print("Download Task Completed with data: \(data).")
default: break
}
}, onError: {
print("Download Task Failure: \($0.localizedDescription)")
}, onCompleted: {
print("Download Task Completed!")
})
// Dispose subscription by dispose bag.
.disposed(by: disposeBag)
```

### Upload Request:

```
// Create `Session` instance.
let session = Session(configuration: .default)
// Create 'HTTPClient' instance.
let httpClient = HTTPClient(session: session, requestInterceptor: self)
// Create `HTTPUploadRequestRouter` instance.
let router = UploadRouter.default
// 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 upload file object.
let uploadObservable: Observable<HTTPUploadRequestEvent<UploadModel>> = httpClient.upload(router, file)
// Subscrible to sequence and observe events.
uploadObservable
.observe(on: MainScheduler.instance)
.subscribe(onNext: {
switch $0 {
case .progress(let progress):
print("Upload Task Progress: \(progress.fractionCompleted*100)%")
case .completed(let model):
print("Upload Task Completed with Response: \(model)")
}
}, onError: {
print("Upload Task Failure: \($0.localizedDescription)")
}, onCompleted: {
print("Upload Task Completed!")
})
// Dispose subscription by dispose bag.
.disposed(by: disposeBag)
```
To get started with the framework, please refer to the [developer documentation](https://loay-ashraf.github.io/RxNetworkKit/).

## Requirements

Expand Down

0 comments on commit 729ea3e

Please sign in to comment.