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

Added model download function #195

Merged
merged 3 commits into from
Aug 4, 2020
Merged

Added model download function #195

merged 3 commits into from
Aug 4, 2020

Conversation

jaimejiyepark
Copy link
Collaborator

Added function to download models with signed url

Copy link
Collaborator

@kingst kingst left a comment

Choose a reason for hiding this comment

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

The code looks good, but we should be consistent about which DisptachQueue we post the response on.

@@ -135,6 +135,23 @@ public struct Api {
apiCall(endpoint: endpoint, parameters: apiParameters, completion: completion)
}

static func modelDownload(signedUrl: String, completion: @escaping ApiCompletion) {
guard let url = URL(string: signedUrl) else {
completion(nil, apiUrlNotSet)
Copy link
Collaborator

Choose a reason for hiding this comment

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

All of our other API calls post the completion routine on the main queue, we should be consistent about this.

@jaimejiyepark jaimejiyepark requested a review from kingst August 4, 2020 17:43
Copy link
Collaborator

@kingst kingst left a comment

Choose a reason for hiding this comment

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

#shipit

@jaimejiyepark jaimejiyepark merged commit 2928bf0 into master Aug 4, 2020
@jaimejiyepark jaimejiyepark changed the title added model download func Added model download function Aug 4, 2020
@jaimejiyepark jaimejiyepark deleted the api_download_models branch August 4, 2020 18:29
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