{"action":"created","comment":{"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments/80531001","id":80531001,"diff_hunk":"@@ -0,0 +1,147 @@\n+//\n+//  Copyright (c) 2016 Google Inc.\n+//\n+//  Licensed under the Apache License, Version 2.0 (the \"License\");\n+//  you may not use this file except in compliance with the License.\n+//  You may obtain a copy of the License at\n+//\n+//  http://www.apache.org/licenses/LICENSE-2.0\n+//\n+//  Unless required by applicable law or agreed to in writing, software\n+//  distributed under the License is distributed on an \"AS IS\" BASIS,\n+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+//  See the License for the specific language governing permissions and\n+//  limitations under the License.\n+//\n+\n+@import UIKit;\n+@import SDWebImage;\n+@import FirebaseStorage;\n+\n+NS_ASSUME_NONNULL_BEGIN\n+\n+@protocol FUIImageCache <NSObject>\n+@required\n+\n+- (nullable UIImage *)imageFromMemoryCacheForKey:(NSString *)key;\n+- (nullable UIImage *)imageFromDiskCacheForKey:(NSString *)key;\n+- (void)storeImage:(UIImage *)image forKey:(NSString *)key;\n+\n+@end\n+\n+@protocol FUIDownloadTask <NSObject>\n+@required\n+\n+- (void)cancel;\n+\n+@end\n+\n+@protocol FUIStorageReference <NSObject>\n+@required\n+\n+@property (nonatomic, readonly) NSString *fullPath;\n+\n+- (id<FUIDownloadTask>)dataWithMaxSize:(int64_t)size\n+                            completion:(void (^)(NSData *_Nullable data,\n+                                                 NSError *_Nullable error))completion;\n+\n+@end\n+\n+@interface FIRStorageReference (FirebaseUI) <FUIStorageReference>\n+@end\n+\n+@interface FIRStorageDownloadTask (FirebaseUI) <FUIDownloadTask>\n+@end\n+\n+@interface SDImageCache (FirebaseUI) <FUIImageCache>\n+@end\n+\n+@interface UIImageView (FirebaseStorage)\n+\n+/**\n+ * The current download task, if the image view is downloading an image.\n+ */\n+@property (nonatomic, readonly, nullable) id<FUIDownloadTask> sd_currentDownload;\n+\n+/**\n+ * Sets the image view's image to an image downloaded from the Firebase Storage reference.\n+ *\n+ * @param storageRef  A Firebase Storage reference containing an image.\n+ * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image\n+ *   could not be found in cache).\n+ */\n+- (nullable id<FUIDownloadTask>)sd_setImageWithStorageReference:(id<FUIStorageReference>)storageRef;\n+\n+/**\n+ * Sets the image view's image to an image downloaded from the Firebase Storage reference.\n+ *\n+ * @param storageRef  A Firebase Storage reference containing an image.\n+ * @param placeholder An image to display while the download is in progress.\n+ * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image\n+ *   could not be found in cache).\n+ */\n+- (nullable id<FUIDownloadTask>)sd_setImageWithStorageReference:(id<FUIStorageReference>)storageRef\n+                                                placeholderImage:(UIImage *)placeholder;\n+\n+/**\n+ * Sets the image view's image to an image downloaded from the Firebase Storage reference.\n+ *\n+ * @param storageRef  A Firebase Storage reference containing an image.\n+ * @param placeholder An image to display while the download is in progress.\n+ * @param completion  A closure to handle events when the image finishes downloading.\n+ *   The closure is not guaranteed to be invoked on the main thread.\n+ * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image\n+ *   could not be found in cache).\n+ */\n+- (nullable id<FUIDownloadTask>)sd_setImageWithStorageReference:(id<FUIStorageReference>)storageRef\n+                                                placeholderImage:(nullable UIImage *)placeholder\n+                                                      completion:(void (^_Nullable)(UIImage *_Nullable,\n+                                                                                    NSError *_Nullable,\n+                                                                                    SDImageCacheType,\n+                                                                                    id<FUIStorageReference>))completion;\n+\n+/**\n+ * Sets the image view's image to an image downloaded from the Firebase Storage reference.\n+ *\n+ * @param storageRef  A Firebase Storage reference containing an image.\n+ * @param size        The maximum size of the downloaded image. If the downloaded image\n+ *   exceeds this size, an error will be raised in the completion block.\n+ * @param placeholder An image to display while the download is in progress.\n+ * @param completion  A closure to handle events when the image finishes downloading.\n+ *   The closure is not guaranteed to be invoked on the main thread.\n+ * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image\n+ *   could not be found in cache).\n+ */\n+- (nullable id<FUIDownloadTask>)sd_setImageWithStorageReference:(id<FUIStorageReference>)storageRef\n+                                                    maxImageSize:(UInt64)size\n+                                                placeholderImage:(nullable UIImage *)placeholder\n+                                                      completion:(void (^_Nullable)(UIImage *_Nullable,\n+                                                                                    NSError *_Nullable,\n+                                                                                    SDImageCacheType,\n+                                                                                    id<FUIStorageReference>))completion;\n+\n+/**\n+ * Sets the image view's image to an image downloaded from the Firebase Storage reference.\n+ *\n+ * @param storageRef  A Firebase Storage reference containing an image.\n+ * @param size        The maximum size of the downloaded image. If the downloaded image\n+ *   exceeds this size, an error will be raised in the completion block.\n+ * @param placeholder An image to display while the download is in progress.\n+ * @param cache       An image cache to check for images before downloading.\n+ * @param completion  A closure to handle events when the image finishes downloading.\n+ *   The closure is not guaranteed to be invoked on the main thread.\n+ * @return Returns a FIRStorageDownloadTask if a download was created (i.e. image\n+ *   could not be found in cache).\n+ */\n+- (nullable id<FUIDownloadTask>)sd_setImageWithStorageReference:(id<FUIStorageReference>)storageRef","path":"FirebaseStorageUI/UIImageView+FirebaseStorage.h","position":null,"original_position":136,"commit_id":"547faf98087b4a644fa4679ee6eadaff1b8118a8","original_commit_id":"3253e23f07936df12e937c2ad53d7f426faeb80a","user":{"login":"mcdonamp","id":2575327,"avatar_url":"https://avatars.githubusercontent.com/u/2575327?v=3","gravatar_id":"","url":"https://api.github.com/users/mcdonamp","html_url":"https://github.com/mcdonamp","followers_url":"https://api.github.com/users/mcdonamp/followers","following_url":"https://api.github.com/users/mcdonamp/following{/other_user}","gists_url":"https://api.github.com/users/mcdonamp/gists{/gist_id}","starred_url":"https://api.github.com/users/mcdonamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcdonamp/subscriptions","organizations_url":"https://api.github.com/users/mcdonamp/orgs","repos_url":"https://api.github.com/users/mcdonamp/repos","events_url":"https://api.github.com/users/mcdonamp/events{/privacy}","received_events_url":"https://api.github.com/users/mcdonamp/received_events","type":"User","site_admin":false},"body":"Ah, yeah, duh--it just reminds me of the same pattern...","created_at":"2016-09-26T17:46:53Z","updated_at":"2016-09-26T17:46:53Z","html_url":"https://github.com/firebase/FirebaseUI-iOS/pull/150#discussion_r80531001","pull_request_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/150","_links":{"self":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments/80531001"},"html":{"href":"https://github.com/firebase/FirebaseUI-iOS/pull/150#discussion_r80531001"},"pull_request":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/150"}}},"pull_request":{"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/150","id":86387392,"html_url":"https://github.com/firebase/FirebaseUI-iOS/pull/150","diff_url":"https://github.com/firebase/FirebaseUI-iOS/pull/150.diff","patch_url":"https://github.com/firebase/FirebaseUI-iOS/pull/150.patch","issue_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/150","number":150,"state":"open","locked":false,"title":"Storage","user":{"login":"morganchen12","id":4529021,"avatar_url":"https://avatars.githubusercontent.com/u/4529021?v=3","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false},"body":"Addresses #146.","created_at":"2016-09-22T18:13:51Z","updated_at":"2016-09-26T17:46:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"049e13a1433d44ce5caa0f3ffa5f4c35892bad72","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/150/commits","review_comments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/150/comments","review_comment_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/150/comments","statuses_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/statuses/547faf98087b4a644fa4679ee6eadaff1b8118a8","head":{"label":"morganchen12:storage","ref":"storage","sha":"547faf98087b4a644fa4679ee6eadaff1b8118a8","user":{"login":"morganchen12","id":4529021,"avatar_url":"https://avatars.githubusercontent.com/u/4529021?v=3","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false},"repo":{"id":64167998,"name":"FirebaseUI-iOS","full_name":"morganchen12/FirebaseUI-iOS","owner":{"login":"morganchen12","id":4529021,"avatar_url":"https://avatars.githubusercontent.com/u/4529021?v=3","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morganchen12/FirebaseUI-iOS","description":null,"fork":true,"url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS","forks_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/forks","keys_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/teams","hooks_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/hooks","issue_events_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/events","assignees_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/tags","blobs_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/languages","stargazers_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/stargazers","contributors_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/contributors","subscribers_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/subscribers","subscription_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/subscription","commits_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/merges","archive_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/downloads","issues_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/labels{/name}","releases_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/deployments","created_at":"2016-07-25T21:06:20Z","updated_at":"2016-07-25T21:06:22Z","pushed_at":"2016-09-23T23:01:27Z","git_url":"git://github.com/morganchen12/FirebaseUI-iOS.git","ssh_url":"git@github.com:morganchen12/FirebaseUI-iOS.git","clone_url":"https://github.com/morganchen12/FirebaseUI-iOS.git","svn_url":"https://github.com/morganchen12/FirebaseUI-iOS","homepage":null,"size":1744,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"firebase:v0.5.6","ref":"v0.5.6","sha":"c30a97815a35d5ee5baaba23c133e552aa07b58b","user":{"login":"firebase","id":1335026,"avatar_url":"https://avatars.githubusercontent.com/u/1335026?v=3","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"repo":{"id":38835282,"name":"FirebaseUI-iOS","full_name":"firebase/FirebaseUI-iOS","owner":{"login":"firebase","id":1335026,"avatar_url":"https://avatars.githubusercontent.com/u/1335026?v=3","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/firebase/FirebaseUI-iOS","description":"iOS UI bindings for Firebase.","fork":false,"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS","forks_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/forks","keys_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/teams","hooks_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/hooks","issue_events_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/events","assignees_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/tags","blobs_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/languages","stargazers_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/stargazers","contributors_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/contributors","subscribers_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/subscribers","subscription_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/subscription","commits_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/merges","archive_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/downloads","issues_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/labels{/name}","releases_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/deployments","created_at":"2015-07-09T17:32:23Z","updated_at":"2016-09-26T02:55:53Z","pushed_at":"2016-09-23T23:01:27Z","git_url":"git://github.com/firebase/FirebaseUI-iOS.git","ssh_url":"git@github.com:firebase/FirebaseUI-iOS.git","clone_url":"https://github.com/firebase/FirebaseUI-iOS.git","svn_url":"https://github.com/firebase/FirebaseUI-iOS","homepage":"","size":1836,"stargazers_count":303,"watchers_count":303,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":90,"mirror_url":null,"open_issues_count":27,"forks":90,"open_issues":27,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/150"},"html":{"href":"https://github.com/firebase/FirebaseUI-iOS/pull/150"},"issue":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/150"},"comments":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/statuses/547faf98087b4a644fa4679ee6eadaff1b8118a8"}}}}
{"actor":{"display_login":"mcdonamp"}}