Latest0.1.1
Homepagehttps://github.com/kylef/RxHyperdrive
LicenseMIT
Platformsios 8.0, osx 10.9, watchos 2.0, requires ARC
DependenciesHyperdrive, RxSwift
Authors

Hyperdrive Logo

Build Status

RxSwift extensions for Hyperdrive, the generic Swift Web API client.

Usage

let hyperdrive = Hyperdrive()

RxHyperdrive adds extensions to Hyperdrive to provide an enter and
request function that returns an observable.

hyperdrive.enter("https://polls.apiblueprint.org/")
  .subscribeNext { representor in
    // We've successfully connected and we have a representor
    // representing the APIs "root" resource.

    print(representor)
  }

Once we’ve got a representor representing the root resource, we can follow
any available transitions such as a transition to the questions
collection resource.

let questions = representor.transitions["questions"]

hyperdrive.request(questions)
  .subscribeNext { representor in
    print(representor)
  }

Using flatMap we can chain both of these operations together producing
an observer of the questions resource.

hyperdrive.enter("https://polls.apiblueprint.org/")
  .flatMap { representor in
    hyperdrive.request(representor.transitions["questions"])
  }
  .subscribeNext { representor in
    print(representor)
  }

Installation

CocoaPods is the recommended way to add RxHyperdrive
to your project.

pod 'RxHyperdrive'

License

RxHyperdrive is released under the MIT license. See LICENSE.

Latest podspec

{
    "name": "RxHyperdrive",
    "version": "0.1.1",
    "summary": "RxSwift extensions for Hyperdrive, the generic Swift Web API client",
    "homepage": "https://github.com/kylef/RxHyperdrive",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kyle Fuller": "[email protected]"
    },
    "social_media_url": "http://twitter.com/kylefuller",
    "source": {
        "git": "https://github.com/kylef/RxHyperdrive.git",
        "tag": "0.1.1"
    },
    "source_files": "RxHyperdrive/*.{h,swift}",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0"
    },
    "requires_arc": true,
    "dependencies": {
        "Hyperdrive": [
            "~> 0.2.0"
        ],
        "RxSwift": [
            "2.0.0-alpha.3"
        ]
    }
}

Pin It on Pinterest

Share This