Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 1.79 KB

README.md

File metadata and controls

67 lines (52 loc) · 1.79 KB

SwiftAPI

Swift API was born as idea of having very light, very fast, written in swift, easy to update and ready to use out of the box library for communication through network. Now that idea is real as cocoapod library.

Installation

Swift-API is available through CocoaPods. To install it, simply add the following line to your Podfile

pod "SwiftAPI"

and run

pod install

Usage

At the beginning, import library by adding

import SwiftAPI

then you can create instance of ApiService

let apiService = ApiService()

or RestService

let rootURL = URL(string:"https://API.SERVER.ADDRESS.COM")
let apiPath = "/v1.0"
let restService = RestService(baseUrl: rootURL, apiPath: apiPath, headerFields: nil)

and now you can start sending requests.

To get familiar with more advanced usage please take a look at usage example available with library.

Authors

License

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