Swiftpack.co -  Rahul-Mayani/RRAlamofireRxAPI as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Rahul-Mayani/RRAlamofireRxAPI
Alamofire API Request by RxSwift
.package(url: "https://github.com/Rahul-Mayani/RRAlamofireRxAPI.git", from: "2.0.0")

RRAlamofireRxAPI

Cocoa Pod Version License: MIT iOS

SPM

Swift 5

Alamofire API Request by RxSwift

Requirements

pod 'RxCocoa'

pod 'RxSwift'

pod 'Alamofire'

Installation

Manually

  1. Download and drop Source folder with files in your project.
  2. Add your API end point URL in your project.
  3. Congratulations!

Pod

RRAlamofireRxAPI is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'RRAlamofireRxAPI', '~> 2.0.0'

SPM (Swift Package Manager)

In Xcode, use the menu File > Swift Packages > Add Package Dependency... and enter the package URL https://github.com/Rahul-Mayani/RRAlamofireRxAPI.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage example

To run the example project, clone the repo, and run pod install from the Example directory first.


let param = [:]
RRAPIRxManager.shared.setURL("API URL") // Post Request
    .setHttpMethod(.post)
    .setParameter(param)
    .setDeferredAsObservable()
    .flatMap { (response1) -> Observable<Any> in
        return RRAPIRxManager.shared.setURL("API URL") // Get Request
                .setDeferredAsObservable()
    }.subscribe { (response) in
        print(response)
    } onError: { (error) in
        print(error)
    }.disposed(by: rxbag)

Contribute

We would love you for the contribution to RRAlamofireRxAPI, check the LICENSE file for more info.

License

RRAlamofireRxAPI is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 11
Last commit: 3 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

Elegant rest HTTP Networking request
Yesterday

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API