Skip to content

Commit 46c94d0

Browse files
committed
- APIError name fix
- travis update
1 parent 49c7446 commit 46c94d0

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: objective-c
2-
osx_image: xcode10.1
2+
osx_image: xcode10.2
33
xcode_project: RESTAPI.xcodeproj
44
xcode_scheme: RESTAPI
5-
xcode_sdk: iphonesimulator12.1
5+
xcode_sdk: iphonesimulator12.2
66
env:
77
global:
88
- FRAMEWORK_NAME=RESTAPI
@@ -23,7 +23,7 @@ script:
2323
deploy:
2424
provider: releases
2525
api_key:
26-
secure: STUvYfgc5bdN/n/1FGB9Hf+cNCMq7Df0Y3PrxSRwMC5rZHy/Y7stDIDh9W1h/rV0QKwmV76Whb5Li3RfuFRqLbOmakPH/z/ijz5X0+pxj3UWH57gpAhJSSfbqPhc5nJ94E12XBGp2Vtmpixh5e6EIfmbVF3+U0LqIL8RaO5sljGGEN5uwR/ZYLQzhNeXnSS0/O3ZPCkdUiA5/U5HBZhvYEH88Dq7FiF0+1oot5CRMcGb1d5gXfReb0i2X3aBxkpVbHYCrZL9UIgT0bFPLv0RYNTcgQRciTtFxzrAZVxLQzRCX+E5g7s1HW+RrWtuea8opP/d6SmJtGbvU1n+eeVWYKR+3TngmDKCbSsUa6MTW6r8t2nW9BA+H46koqj9jwku5KBtYAmXaz3cVuocjw4OVMuS97jBqKMwqg0TYN+NAokNF7eR/tbvOCByiqLOn8hii/Ua22ixrYClkn5KsLB/WqRjTHV9XaPtdwT5t7iKuzQtwErEB0vafR+Fpb6uBPfHAMmmUH7/toNmBpcBr6GG6lWmJUD3DdjXOpyB46OigRVyTIt0x1CgO+bbU5ZSr+lmZuRS++IXL2E5vbN3zXlJNvG6KNPdEmgEsIBEmOJgH6tErpF3WKI5RGt0n4qmkEnZZmLcjbcZ01YgHqfYGZBBHQ+h/L3LeaLt93QuZu3g6sY=
26+
secure: $GITHUB_RELEASE_KEY
2727
file:
2828
- "$FRAMEWORK_NAME.framework.zip"
2929
- "$IMAGE_FRAMEWORK_NAME.framework.zip"
@@ -34,5 +34,5 @@ deploy:
3434
notifications:
3535
slack:
3636
rooms:
37-
- gujci:xWMjD0glKEDR1fB3D9sfiG57#restapi
37+
- gujci: ${SLACK_WORKSPACE}#restapi
3838
email: false

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,12 @@ One type must not implement this protocol twice or more, meaning it is not suppo
281281
A response wrapper is provided in the frameworj for all `ValidResponseData` in order to parse both the success and a possible error response. However, using the same structure, you can implement any other type of generic response to match your needs. An example cann with the built in one looks like the following:
282282

283283
```swift
284-
testServerApi.get("/endpoint") { (status, response: Response<ExampleResponse, APIEror>?) in
284+
testServerApi.get("/endpoint") { (status, response: Response<ExampleResponse, APIError>?) in
285285
//...
286286
}
287287
```
288288

289-
Where `APIEror` is an other custom `ValidResponseData` type, but `JSON` is accepted as well (since it also conforms to `ValidResponseData`). Note, that array of `ValidResponseData` also conforms to `ValidResponseData`.
289+
Where `APIError` is an other custom `ValidResponseData` type, but `JSON` is accepted as well (since it also conforms to `ValidResponseData`). Note, that array of `ValidResponseData` also conforms to `ValidResponseData`.
290290

291291
# Debugging
292292

RESTAPI/API.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,4 @@ open class API {
226226
}
227227

228228
/// Legacy support
229-
@available(*, unavailable, renamed: "ResponseStatus")
230-
public typealias APIError = ResponseStatus
231-
232229
public typealias ValidJSONObject = ValidJSONData

RESTAPI/ValidResponseData/UtilTypes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public struct Response<DataType: ValidResponseData, ErrorType: ValidResponseData
1717
}
1818

1919

20-
public struct APIEror: JSONParseable {
20+
public struct APIError: JSONParseable {
2121

2222
public var message: String
2323

RESTAPITests/RESTAPITests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class RESTAPITests: XCTestCase {
141141
func testGetArrayResponse() {
142142
let expectation = self.expectation(description: "get")
143143

144-
testServerApi.get("/posts") { (status, response: Response<[ExamplePostModel], APIEror>?) in
144+
testServerApi.get("/posts") { (status, response: Response<[ExamplePostModel], APIError>?) in
145145
XCTAssertNotNil(response?.data)
146146
XCTAssertNil(response?.error)
147147
expectation.fulfill()

0 commit comments

Comments
 (0)