Sitelet https://github.com/ishkawa/APIKit/pull/194
Skip to content

Swift 3 support - #194

Merged
ishkawa merged 39 commits into
masterfrom
si-swift3
Sep 17, 2016
Merged

ishkawa merged 39 commits into
masterfrom
si-swift3

Conversation

@ikesyo

@ikesyo ikesyo commented Aug 8, 2016 •

Copy link
Copy Markdown
Collaborator

Depends on #193. ✅

We should audit the APIs to match with Swift 3 API Design Guidelines.

@MarvinNazari

Copy link
Copy Markdown

@ikesyo is this updated to the latest beta?

@MarvinNazari

Copy link
Copy Markdown

Hi @ikesyo, shouldn't we rename interceptURLRequest and interceptObject too like you did responseFromObject?
what about change enum cases to lowercase too maybe?
I would love to help! if there is anything i can do!

@MarvinNazari

Copy link
Copy Markdown

the Xcode 8 is out, can we merge this @ikesyo @ishkawa?

@ishkawa

ishkawa commented Sep 15, 2016

Copy link
Copy Markdown
Owner

@ikesyo Thank you for the great work 👍 👍 👍

I have some suggestions that would improve smoothness with Swift 3 APIs.

Omit Type suffix of some protocols

According to the API Design Guidelines, "Protocols that describe what something is should read as nouns (e.g. Collection)." RequestType, BodyParametersType, DataParserType and SessionAdapterType seem to satisfy this condition.

Rename sendRequest(_:handler:) to send(_:handler:)

IMO, the word "request" can be omitted because it is implied when we send something from Session.

Rename cancelRequest(_:passingTest:) to cancelRequests(withType:passingTest:)

Unlike the sending method, canceling method treats multiple requests. I think we should imply we may cancel multiple requests, so the word "requests" should be exposed in method name. In addition, withType label is necessary because the type of the first parameter is not explicit in this context.

@ishkawa

ishkawa commented Sep 15, 2016 •

Copy link
Copy Markdown
Owner

After we resolve renaming, I will merge this PR and initial beta of 3.0 ✨

@ikesyo ikesyo changed the title [WIP] Initial Swift 3 support Swift 3 support Sep 16, 2016
@ikesyo

ikesyo commented Sep 16, 2016

Copy link
Copy Markdown
Collaborator Author

The renaming is finished. ✨

@ishkawa

ishkawa commented Sep 17, 2016

Copy link
Copy Markdown
Owner

🎉

@ishkawa
ishkawa merged commit 2296315 into master Sep 17, 2016
@ishkawa
ishkawa deleted the si-swift3 branch September 17, 2016 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants