Latest 1.1.0
Homepage https://github.com/joalbright/Relax
License MIT
Platforms ios 9.0, requires ARC
Dependencies Encodable
Authors

RESTful API endpoint manager

Version
License
Platform

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.

Latest podspec

{
    "name": "Relax",
    "version": "1.1.0",
    "summary": "RESTful API endpoint manager",
    "description": "Relax allows you to build all of your endpoints up front and call them with simple enum options later. Reduces code drastically, along with allowing you to have one place to manage all endpoints. Prebuilt API endpoint collections https://github.com/joalbright/Relax/APIs.",
    "homepage": "https://github.com/joalbright/Relax",
    "license": "MIT",
    "authors": {
        "Jo Albright": "[email protected]"
    },
    "source": {
        "git": "https://github.com/joalbright/Relax.git",
        "tag": "1.1.0"
    },
    "social_media_url": "https://twitter.com/joalbright",
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source_files": "Sources/**/*",
    "resource_bundles": {
        "Relax": [
            "Sources/*.png"
        ]
    },
    "dependencies": {
        "Encodable": [
            "~> 1.0.0"
        ]
    }
}

Pin It on Pinterest

Share This