{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/107967712","pull_request_review_id":28972752,"id":107967712,"diff_hunk":"@@ -0,0 +1,183 @@\n+import FBAudienceNetwork\n+import Crashlytics\n+\n+// MARK: Cacheble protocol\n+fileprivate protocol Cacheble {\n+\n+  typealias Completion = (Cacheble) -> Void\n+\n+  typealias EventName = String\n+  typealias ErrorDetails = [String : Any]\n+  typealias Failure = (EventName, ErrorDetails, NSError) -> Void\n+\n+  func reload(_ completion: @escaping Completion, failure: @escaping Failure)\n+  func bannerIsOutOfScreen()\n+  func bannerIsOnScreen()\n+\n+  var isNeedToRetain: Bool { get }\n+  var isPossibleToReload: Bool { get }\n+  var adID: String { get }\n+}\n+\n+// MARK: CachebleFacebookBanner\n+fileprivate final class CachebleFacebookBanner: FBNativeAd, Cacheble {\n+\n+  fileprivate var completion: Cacheble.Completion?\n+  fileprivate var failure: Cacheble.Failure?\n+\n+  func reload(_ comp: @escaping Cacheble.Completion, failure fail: @escaping Cacheble.Failure) {\n+    completion = comp\n+    failure = fail\n+\n+    mediaCachePolicy = .all\n+    delegate = self\n+    load()\n+    requestDate = Date()\n+  }\n+\n+  func bannerIsOutOfScreen() {\n+    if let date = loadBannerDate {","path":"iphone/Maps/UI/PlacePage/BannersCache.swift","position":39,"original_position":39,"commit_id":"cdad0ded5e010aa8fe54e3544ff67355a4e4ad4c","original_commit_id":"cdad0ded5e010aa8fe54e3544ff67355a4e4ad4c","user":{"login":"igrechuhin","id":2698571,"avatar_url":"https://avatars3.githubusercontent.com/u/2698571?v=3","gravatar_id":"","url":"https://api.github.com/users/igrechuhin","html_url":"https://github.com/igrechuhin","followers_url":"https://api.github.com/users/igrechuhin/followers","following_url":"https://api.github.com/users/igrechuhin/following{/other_user}","gists_url":"https://api.github.com/users/igrechuhin/gists{/gist_id}","starred_url":"https://api.github.com/users/igrechuhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrechuhin/subscriptions","organizations_url":"https://api.github.com/users/igrechuhin/orgs","repos_url":"https://api.github.com/users/igrechuhin/repos","events_url":"https://api.github.com/users/igrechuhin/events{/privacy}","received_events_url":"https://api.github.com/users/igrechuhin/received_events","type":"User","site_admin":false},"body":"guard","created_at":"2017-03-24T18:13:03Z","updated_at":"2017-03-24T18:48:26Z","html_url":"https://github.com/mapsme/omim/pull/5656#discussion_r107967712","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/5656","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/107967712"},"html":{"href":"https://github.com/mapsme/omim/pull/5656#discussion_r107967712"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/5656"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/5656","id":111779227,"html_url":"https://github.com/mapsme/omim/pull/5656","diff_url":"https://github.com/mapsme/omim/pull/5656.diff","patch_url":"https://github.com/mapsme/omim/pull/5656.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/5656","number":5656,"state":"open","locked":false,"title":"[ios] Added caching to banners.","user":{"login":"VladiMihaylenko","id":6297856,"avatar_url":"https://avatars0.githubusercontent.com/u/6297856?v=3","gravatar_id":"","url":"https://api.github.com/users/VladiMihaylenko","html_url":"https://github.com/VladiMihaylenko","followers_url":"https://api.github.com/users/VladiMihaylenko/followers","following_url":"https://api.github.com/users/VladiMihaylenko/following{/other_user}","gists_url":"https://api.github.com/users/VladiMihaylenko/gists{/gist_id}","starred_url":"https://api.github.com/users/VladiMihaylenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladiMihaylenko/subscriptions","organizations_url":"https://api.github.com/users/VladiMihaylenko/orgs","repos_url":"https://api.github.com/users/VladiMihaylenko/repos","events_url":"https://api.github.com/users/VladiMihaylenko/events{/privacy}","received_events_url":"https://api.github.com/users/VladiMihaylenko/received_events","type":"User","site_admin":false},"body":"https://confluence.mail.ru/display/MAPSME/Facebook+Native+Ads#FacebookNativeAds-Statistics (Architecture paragraph)","created_at":"2017-03-21T13:36:18Z","updated_at":"2017-03-24T18:48:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67d8ddbecf2df4a79bb0eb88580937d6e0ea4454","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/5656/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/5656/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/5656/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/cdad0ded5e010aa8fe54e3544ff67355a4e4ad4c","head":{"label":"VladiMihaylenko:banners-cache","ref":"banners-cache","sha":"cdad0ded5e010aa8fe54e3544ff67355a4e4ad4c","user":{"login":"VladiMihaylenko","id":6297856,"avatar_url":"https://avatars0.githubusercontent.com/u/6297856?v=3","gravatar_id":"","url":"https://api.github.com/users/VladiMihaylenko","html_url":"https://github.com/VladiMihaylenko","followers_url":"https://api.github.com/users/VladiMihaylenko/followers","following_url":"https://api.github.com/users/VladiMihaylenko/following{/other_user}","gists_url":"https://api.github.com/users/VladiMihaylenko/gists{/gist_id}","starred_url":"https://api.github.com/users/VladiMihaylenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladiMihaylenko/subscriptions","organizations_url":"https://api.github.com/users/VladiMihaylenko/orgs","repos_url":"https://api.github.com/users/VladiMihaylenko/repos","events_url":"https://api.github.com/users/VladiMihaylenko/events{/privacy}","received_events_url":"https://api.github.com/users/VladiMihaylenko/received_events","type":"User","site_admin":false},"repo":{"id":43432599,"name":"omim","full_name":"VladiMihaylenko/omim","owner":{"login":"VladiMihaylenko","id":6297856,"avatar_url":"https://avatars0.githubusercontent.com/u/6297856?v=3","gravatar_id":"","url":"https://api.github.com/users/VladiMihaylenko","html_url":"https://github.com/VladiMihaylenko","followers_url":"https://api.github.com/users/VladiMihaylenko/followers","following_url":"https://api.github.com/users/VladiMihaylenko/following{/other_user}","gists_url":"https://api.github.com/users/VladiMihaylenko/gists{/gist_id}","starred_url":"https://api.github.com/users/VladiMihaylenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladiMihaylenko/subscriptions","organizations_url":"https://api.github.com/users/VladiMihaylenko/orgs","repos_url":"https://api.github.com/users/VladiMihaylenko/repos","events_url":"https://api.github.com/users/VladiMihaylenko/events{/privacy}","received_events_url":"https://api.github.com/users/VladiMihaylenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VladiMihaylenko/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/VladiMihaylenko/omim","forks_url":"https://api.github.com/repos/VladiMihaylenko/omim/forks","keys_url":"https://api.github.com/repos/VladiMihaylenko/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VladiMihaylenko/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VladiMihaylenko/omim/teams","hooks_url":"https://api.github.com/repos/VladiMihaylenko/omim/hooks","issue_events_url":"https://api.github.com/repos/VladiMihaylenko/omim/issues/events{/number}","events_url":"https://api.github.com/repos/VladiMihaylenko/omim/events","assignees_url":"https://api.github.com/repos/VladiMihaylenko/omim/assignees{/user}","branches_url":"https://api.github.com/repos/VladiMihaylenko/omim/branches{/branch}","tags_url":"https://api.github.com/repos/VladiMihaylenko/omim/tags","blobs_url":"https://api.github.com/repos/VladiMihaylenko/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VladiMihaylenko/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VladiMihaylenko/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/VladiMihaylenko/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VladiMihaylenko/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/VladiMihaylenko/omim/languages","stargazers_url":"https://api.github.com/repos/VladiMihaylenko/omim/stargazers","contributors_url":"https://api.github.com/repos/VladiMihaylenko/omim/contributors","subscribers_url":"https://api.github.com/repos/VladiMihaylenko/omim/subscribers","subscription_url":"https://api.github.com/repos/VladiMihaylenko/omim/subscription","commits_url":"https://api.github.com/repos/VladiMihaylenko/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/VladiMihaylenko/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/VladiMihaylenko/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/VladiMihaylenko/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/VladiMihaylenko/omim/contents/{+path}","compare_url":"https://api.github.com/repos/VladiMihaylenko/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VladiMihaylenko/omim/merges","archive_url":"https://api.github.com/repos/VladiMihaylenko/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VladiMihaylenko/omim/downloads","issues_url":"https://api.github.com/repos/VladiMihaylenko/omim/issues{/number}","pulls_url":"https://api.github.com/repos/VladiMihaylenko/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/VladiMihaylenko/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/VladiMihaylenko/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VladiMihaylenko/omim/labels{/name}","releases_url":"https://api.github.com/repos/VladiMihaylenko/omim/releases{/id}","deployments_url":"https://api.github.com/repos/VladiMihaylenko/omim/deployments","created_at":"2015-09-30T12:49:57Z","updated_at":"2016-01-12T07:16:27Z","pushed_at":"2017-03-24T13:22:12Z","git_url":"git://github.com/VladiMihaylenko/omim.git","ssh_url":"git@github.com:VladiMihaylenko/omim.git","clone_url":"https://github.com/VladiMihaylenko/omim.git","svn_url":"https://github.com/VladiMihaylenko/omim","homepage":null,"size":2857021,"stargazers_count":0,"watchers_count":0,"language":"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":"mapsme:master","ref":"master","sha":"0c189e2146f2ea33b3708000b436e44511ccac5a","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars2.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars2.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"🗺️ MAPS.ME — Offline OpenStreetMap maps for iOS and Android","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","deployments_url":"https://api.github.com/repos/mapsme/omim/deployments","created_at":"2015-09-20T02:57:13Z","updated_at":"2017-03-24T07:58:30Z","pushed_at":"2017-03-24T16:47:35Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":"","size":2985286,"stargazers_count":2193,"watchers_count":2193,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":443,"mirror_url":null,"open_issues_count":448,"forks":443,"open_issues":448,"watchers":2193,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/5656"},"html":{"href":"https://github.com/mapsme/omim/pull/5656"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/5656"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/5656/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/5656/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/5656/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/cdad0ded5e010aa8fe54e3544ff67355a4e4ad4c"}}}}
{"actor":{"display_login":"igrechuhin"}}