Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked from ishkawa/APIKit

Type-safe networking abstraction layer that associates request type with response type.

License

Notifications You must be signed in to change notification settings

symbiand/APIKit

Repository files navigation

APIKit

Build Status codecov Carthage compatible Version Platform

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

// SearchRepositoriesRequest conforms to Request protocol.
let request = SearchRepositoriesRequest(query: "swift")
// Session receives an instance of a type that conforms to Request.
Session.send(request) { result in
 switch result {
 case .success(let response):
 // Type of `response` is `[Repository]`,
 // which is inferred from `SearchRepositoriesRequest`.
 print(response)
 case .failure(let error):
 self.printError(error)
 }
}

Requirements

  • Swift 3.0
  • iOS 8.0 or later
  • Mac OS 10.10 or later
  • watchOS 2.0 or later
  • tvOS 9.0 or later

If you use Swift 2.2 or 2.3, try APIKit 2.0.5.

Installation

  • Insert github "ishkawa/APIKit" ~> 3.0 to your Cartfile.
  • Run carthage update.
  • Link your app with APIKit.framework and Result.framework in Carthage/Build.
  • Insert pod 'APIKit', '~> 3.0' to your Podfile.
  • Run pod install.

Note: CocoaPods 1.1.0 is required to install APIKit 3.

Documentation

Advanced Guides

Migration Guides

About

Type-safe networking abstraction layer that associates request type with response type.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 97.8%
  • Ruby 1.8%
  • Objective-C 0.4%

AltStyle によって変換されたページ (->オリジナル) /