Relax 1.1.0

Relax 1.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2016
SPMSupports SPM

Maintained by Jo Albright.


Downloads

Total16
Week0
Month0

Installs

Apps4
Test Targets1
powered by Segment

GitHub

Stars0
Watchers0
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files5
LOCLines of Code 180


Relax 1.1.0

RESTful API endpoint manager

Needs

This library will need a lot of management to keep APIs updated. My plan is to start laying them out and try to find others who use specific APIs and have them keep those up to date.

Roadmap

APIs

  • [x] Done
  • [ ] Started
  • [ ] API : Docs documentation link
  • [x] API : File source file
  • [ ] API : Lead Name lead contributer

Please submit an issue if you would like a lead position for any (listed/unlisted) API

API Groups

Please submit an issue for any APIs you would like to see added.


Features

  • [ ] Response Object Structure (still dreaming this up)
  • [x] Authentication Structure docs coming soon
  • [ ] AlamoFire Support (other?)

Usage

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

Example project screens.

APIs Marvel Foursquare iTunes

Choose or Create API

Go here to choose a prebuilt API or create your own. The example below uses the prebuilt GitHubAPI.

Use API

You will need to register an application. Then create a Keys.swift file (make sure to ignore the file if your repo is public).

run a request

let githubAPI = GithubAPI.session

// setup endpoint

var profile = GithubAPI.Endpoints.UsersNamed.endpoint

profile.pathpieces = ["username" : "joalbright"]

// run request

githubAPI.request(profile) {

   // object returned = $0.info 
   // error returned = $0.error 

}

Requirements

This pod uses Encodable.

Installation

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

pod "Relax"

Relax is also available through Swift Package Manager. Please take a look at the link to learn more about how to use SwiftPM.

import PackageDescription

let package = Package(
    name: "YOUR_PACKAGE_NAME",
    dependencies: [
        .Package(url: "https://github.com/joalbright/Relax.git", majorVersion: 0)
    ]
)

Author

Jo Albright

License

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