Latest 0.4.1
Homepage https://github.com/muukii/RESTRequest
License MIT
Platforms ios 8.0, tvos 9.0, requires ARC
Dependencies BrickRequest, SwiftyJSON, RxSwift
Authors

CI Status
Version
License
Platform

Example usage of BrickRequest.

RESTRequest’s dependencies.

  • BrickRequest (Good architecture for Alamofire)
  • Alamofire (Request core)
  • RxSwift (Dispatch, AutoRetry with reachability)
  • SwiftyJSON (Response, Request parameters)

Usage

Define Requests

  • GET

    struct GetUsers: GETRequestType {
    var path: String {
    return "/user"
    }
    
    var parameterJSON: JSON {
    let json = JSON([
      "limit" : 10,
      "page" : 1,
    ])
    return json
    }
    }

Dispatch Requests

let context = GetUsers()
_ = context.resume().subscribeNext { json in
    // response
}

Requirements

Installation

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

pod "RESTRequest"

Author

muukii, [email protected]

License

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

Latest podspec

{
    "name": "RESTRequest",
    "version": "0.4.1",
    "summary": "Reference implementation of BrickRequest for accessing REST APIs",
    "description": "Reference implementation of BrickRequest for accessing REST APIsnPowered by Alamofire",
    "homepage": "https://github.com/muukii/RESTRequest",
    "license": "MIT",
    "authors": {
        "muukii": "[email protected]"
    },
    "source": {
        "git": "https://github.com/muukii/RESTRequest.git",
        "tag": "0.4.1"
    },
    "platforms": {
        "ios": "8.0",
        "tvos": "9.0"
    },
    "requires_arc": true,
    "source_files": "RESTRequest/*.swift",
    "dependencies": {
        "BrickRequest": [
            "~> 0.4.0"
        ],
        "SwiftyJSON": [
            "~> 2.3.1"
        ],
        "RxSwift": [
            "~> 2.0"
        ]
    }
}

Pin It on Pinterest

Share This