TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jan 2016 |
SPMSupports SPM | ✓ |
Maintained by Jo Albright.
RESTful API endpoint manager
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.
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.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Example project screens.
Go here to choose a prebuilt API or create your own. The example below uses the prebuilt GitHubAPI.
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
}
This pod uses Encodable.
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)
]
)
Relax is available under the MIT license. See the LICENSE file for more info.