Skip to content

Releases: ishkawa/APIKit

1.0.0 beta.13

09 Nov 07:49
Compare
Choose a tag to compare
1.0.0 beta.13 Pre-release
Pre-release
  • Follow the latest version of Result (0.6.0-beta.6).

1.0.0 beta.12

09 Nov 06:36
Compare
Choose a tag to compare
1.0.0 beta.12 Pre-release
Pre-release

Update dependency to fix installing via Carthage. #97

1.0.0 beta.11

31 Oct 12:37
Compare
Choose a tag to compare
1.0.0 beta.11 Pre-release
Pre-release
  • Built in Swift 2.1.
  • Avoid calling parameters in RequestType. #95

1.0.0 beta.10

27 Oct 03:53
Compare
Choose a tag to compare
1.0.0 beta.10 Pre-release
Pre-release
  • Make RequestType.parseData() public.

1.0.0 beta.9

19 Oct 19:09
Compare
Choose a tag to compare
1.0.0 beta.9 Pre-release
Pre-release

Breaking Changes

  • API is renamed to Session (#86). An instance of Session has an instance of NSURLSession. If you want to enqueue a request to specific NSURLSession, instantiate Session with the NSURLSession and call its instance methods. Type methods of Session use the default instance Session.sharedSession.

New code for sending requests looks like below:

let request = /* create a request */

Session.sendRequest(request) { result in
    // handle result
}

To enqueue a request into specific NSURLSession:

let session = Session(URLSession: /* NSURLSession instance here */)
let request =  /* create a request */

session.sendRequest(request) { result in
    // handle result
}

1.0.0 beta.8

15 Oct 14:28
Compare
Choose a tag to compare
1.0.0 beta.8 Pre-release
Pre-release
  • Handle NSNull in RequestType.parameters as a nullable value. If you want to preserve a key and express absence of value, specify NSNull() for the value of the key. #84

1.0.0 beta.7

15 Oct 13:03
Compare
Choose a tag to compare
1.0.0 beta.7 Pre-release
Pre-release
  • NSURLRequest instance of RequestType is now available from buildURLRequest() method. #78
  • Change type of RequestType.parameters from [String: AnyObject] to [String: AnyObject?]. Now, parameter can contain nullable values and it will be encoded correctly both in JSON and URL encoding. #83 This change is reverted by #84 in 1.0.0-beta.8. If you want to pass nullable value to parameters, use NSNull. Both NSJSONSerialization and URLEncodedSerialization handle it.

Breaking Changes

  • Request protocol is renamed as RequestType for consistency with the Swift standard library. #82

1.0.0 beta.6

03 Oct 07:23
Compare
Choose a tag to compare
1.0.0 beta.6 Pre-release
Pre-release
  • Replace CFURLCreateStringByAddingPercentEscapes() with String. stringByAddingPercentEncodingWithAllowedCharacters. #74

Thanks @totomo!!

1.0.0 beta5

04 Sep 08:15
Compare
Choose a tag to compare
1.0.0 beta5 Pre-release
Pre-release
  • Add NSHTTPURLResponse and raw response object to NSError.userInfo of UnacceptableStatusCode #64.
  • Fix some URL standardizing issues #64.

Thanks @akisute for these patches!

1.0.0 beta4

26 Aug 14:40
Compare
Choose a tag to compare
1.0.0 beta4 Pre-release
Pre-release
  • Swift 2 beta 6