Latest 1.6.2
Homepage https://github.com/xsolve-pl/swift-api
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0, requires ARC
Frameworks Foundation
Authors , ,

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. Main features of library:

  • Written using Swift 4
  • Ready to use out of the box
  • Using URLSession for managing requests
  • Allows sending requests in foreground or background
  • Supports connection with REST and non-REST APIs
  • Introduces easy to use wrapper for status codes
  • Is available for iOS, macOS, watchOS and tvOS
  • Supports Codable protocol

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)

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.

Latest podspec

{
    "name": "SwiftAPI",
    "version": "1.6.2",
    "summary": "Simple networking library based on URLSession with REST API support.",
    "description": "SwiftAPI is simple networking library created by XSolve which allows easy connection with server out of the box. It's written in Swift 4, using URLSession for managing requests.",
    "homepage": "https://github.com/xsolve-pl/swift-api",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Marek Kojder": "[email protected]",
        "Su0142awomir Zagu00f3rski": "[email protected]",
        "Radosu0142aw Budzik": "[email protected]"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source": {
        "git": "https://github.com/xsolve-pl/swift-api.git",
        "branch": "master",
        "tag": "1.6.2"
    },
    "source_files": "Sources/**/*.{h,swift}",
    "frameworks": "Foundation",
    "requires_arc": true
}

Pin It on Pinterest

Share This