Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add URL arguments on get methods #3

Merged
merged 3 commits into from
Jan 6, 2018

Conversation

williamhjcho
Copy link
Collaborator

@williamhjcho williamhjcho commented Jan 5, 2018

This allows URL to be build beforehand by someone else

The String argument overloads should prefer/use URL overloads since they are already converted and ready for use

@codecov-io
Copy link

codecov-io commented Jan 5, 2018

Codecov Report

Merging #3 into master will decrease coverage by 1.26%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
- Coverage   94.04%   92.78%   -1.27%     
==========================================
  Files           6        6              
  Lines          84       97      +13     
  Branches        7        8       +1     
==========================================
+ Hits           79       90      +11     
- Misses          5        7       +2
Impacted Files Coverage Δ
Sources/Frisbee/Requestables/NetworkGetter.swift 92.68% <100%> (+1.77%) ⬆️
...rces/Frisbee/Interactors/URLWithQueryBuilder.swift 86.66% <100%> (-13.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40f9b64...92aae03. Read the comment docs.

@williamhjcho williamhjcho force-pushed the add-url-arguments branch 3 times, most recently from 1b15ebd to d0d98a2 Compare January 6, 2018 16:04
public func get<Entity: Decodable, Query: Encodable>(url: String, query: Query,
onComplete: @escaping (Result<Entity>) -> Void) {
guard let url = URL(string: url) else {
return
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is necessary to call onComplete with fail and FrisbeeError.invalidUrl error.

The String argument overloads should prefer URL overloads since they are already converted and ready for use
@ronanrodrigo ronanrodrigo merged commit a7f6c90 into ronanrodrigo:master Jan 6, 2018
@ronanrodrigo
Copy link
Owner

Thank you @william-wc it was very good!

@williamhjcho williamhjcho deleted the add-url-arguments branch January 6, 2018 22:38
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.

None yet

3 participants