joalbright / Relax

A framework built to work with APIs by setting up their endpoints and model structures.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Relax

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

  • Done : Docs documentation link : File source file
  • Started : Docs documentation link : File source file
  • Future : Docs documentation link

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 docs coming soon
  • Authentication Structure docs coming soon

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 uses Parsable.

Author

Jo Albright

License

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

About

A framework built to work with APIs by setting up their endpoints and model structures.

License:MIT License


Languages

Language:Swift 100.0%