A networking library for building type safe web API client in Swift.
Swift Ruby Objective-C
Pull request Compare This branch is 125 commits behind ishkawa:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
APIKit.xcodeproj
APIKit.xcworkspace
Carthage/Checkouts
Configurations
Demo.playground
Documentation
Sources
Tests/APIKit
.gitignore
.gitmodules
.swift-version
.travis.yml
APIKit.podspec
Cartfile
Cartfile.private
Cartfile.resolved
LICENSE.md
Package.swift
README.md
codecov.yml

README.md

APIKit

Build Status codecov Carthage compatible Version Platform

APIKit is a type-safe networking abstraction layer that associates request type with response type.

let request = SearchRepositoriesRequest(query: "APIKit", sort: .Stars)

Session.sendRequest(request) { result in
    switch result {
    case .Success(let repositories):
        // Type of `repositories` is `[Repository]`,
        // which is inferred from `SearchRepositoriesRequest`.
        print(repositories)

    case .Failure(let error):
        print(error)
    }
}

Requirements

  • Swift 2.2, 2.3
  • iOS 8.0 or later
  • Mac OS 10.10 or later
  • watchOS 2.0 or later
  • tvOS 9.0 or later

Installation

Carthage

  • Insert github "ishkawa/APIKit" ~> 2.0 to your Cartfile.
  • Run carthage update.
  • Link your app with APIKit.framework and Result.framework in Carthage/Checkouts.

CocoaPods

  • Insert pod 'APIKit', '~> 2.0' to your Podfile.
  • Run pod install.

Documentation

Advanced Guides

Migration Guides