{"action":"created","comment":{"url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/comments/144735549","pull_request_review_id":69433640,"id":144735549,"diff_hunk":"@@ -12,16 +12,50 @@ import Parse\n import CoreLocation\n \n class Pin: PFObject, PFSubclassing {\n+    //MARK: DB properties\n     @NSManaged var blurb: String?\n+    @NSManaged var location: PFGeoPoint?\n     @NSManaged var latitude: NSDecimalNumber?\n     @NSManaged var longitude: NSDecimalNumber?\n-    @NSManaged var location: CLLocation? // TODO: is this the right data type?\n     @NSManaged var message: String?\n-    @NSManaged var imageUrl: URL?\n-    //@NSManaged var tags: [String]?\n+    @NSManaged var imageUrlStr: String?\n+    @NSManaged var tagIds: [String]?\n+    \n+    // MARK: non-DB properties\n+    var tags: [Tag]?\n+    var imageUrl: URL?\n+    \n+    override init() {\n+        super.init()\n+        \n+        let tagQuery = Tag.query()\n+        tagQuery!.whereKey(\"objectId\", containedIn: tagIds ?? [])\n+        tagQuery!.findObjectsInBackground { (tags: [PFObject]?, error: Error?) in\n+            if error == nil {\n+                for tag in tags! {\n+                    let tag = tag as! Tag\n+                    self.tags?.append(tag)\n+                }\n+            } else {\n+                print(\"error fetching tags: \\(error!.localizedDescription)\")\n+            }\n+        }\n+        \n+        if imageUrlStr != nil {\n+            imageUrl = URL(string: imageUrlStr!)\n+        }\n+    }\n     \n     static func parseClassName() -> String {\n         return \"Pin\"\n     }\n+    \n+    func setLocation() {\n+        if latitude != nil && longitude != nil {\n+            location = PFGeoPoint(latitude: latitude as! Double, longitude: longitude as! Double)","path":"Sweeper/Models/Pin.swift","position":47,"original_position":47,"commit_id":"2fcd9e41032d72965d338202e83059b7f0dc3ad5","original_commit_id":"2fcd9e41032d72965d338202e83059b7f0dc3ad5","user":{"login":"huw30","id":5446130,"avatar_url":"https://avatars2.githubusercontent.com/u/5446130?v=4","gravatar_id":"","url":"https://api.github.com/users/huw30","html_url":"https://github.com/huw30","followers_url":"https://api.github.com/users/huw30/followers","following_url":"https://api.github.com/users/huw30/following{/other_user}","gists_url":"https://api.github.com/users/huw30/gists{/gist_id}","starred_url":"https://api.github.com/users/huw30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huw30/subscriptions","organizations_url":"https://api.github.com/users/huw30/orgs","repos_url":"https://api.github.com/users/huw30/repos","events_url":"https://api.github.com/users/huw30/events{/privacy}","received_events_url":"https://api.github.com/users/huw30/received_events","type":"User","site_admin":false},"body":"Nice Job!","created_at":"2017-10-15T23:24:38Z","updated_at":"2017-10-15T23:26:49Z","html_url":"https://github.com/carnivorous-fuzz/location-messaging/pull/10#discussion_r144735549","pull_request_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/10","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/comments/144735549"},"html":{"href":"https://github.com/carnivorous-fuzz/location-messaging/pull/10#discussion_r144735549"},"pull_request":{"href":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/10","id":146674393,"html_url":"https://github.com/carnivorous-fuzz/location-messaging/pull/10","diff_url":"https://github.com/carnivorous-fuzz/location-messaging/pull/10.diff","patch_url":"https://github.com/carnivorous-fuzz/location-messaging/pull/10.patch","issue_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues/10","number":10,"state":"open","locked":false,"title":"fix pin create; add tags relation","user":{"login":"sokolikp","id":2007220,"avatar_url":"https://avatars1.githubusercontent.com/u/2007220?v=4","gravatar_id":"","url":"https://api.github.com/users/sokolikp","html_url":"https://github.com/sokolikp","followers_url":"https://api.github.com/users/sokolikp/followers","following_url":"https://api.github.com/users/sokolikp/following{/other_user}","gists_url":"https://api.github.com/users/sokolikp/gists{/gist_id}","starred_url":"https://api.github.com/users/sokolikp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokolikp/subscriptions","organizations_url":"https://api.github.com/users/sokolikp/orgs","repos_url":"https://api.github.com/users/sokolikp/repos","events_url":"https://api.github.com/users/sokolikp/events{/privacy}","received_events_url":"https://api.github.com/users/sokolikp/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-15T23:10:37Z","updated_at":"2017-10-15T23:26:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0e2c53e1c6c4b4ddde0329ee3597518b3399ead","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/10/commits","review_comments_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/10/comments","review_comment_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/comments{/number}","comments_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues/10/comments","statuses_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/statuses/2fcd9e41032d72965d338202e83059b7f0dc3ad5","head":{"label":"carnivorous-fuzz:pin-create","ref":"pin-create","sha":"2fcd9e41032d72965d338202e83059b7f0dc3ad5","user":{"login":"carnivorous-fuzz","id":32532938,"avatar_url":"https://avatars1.githubusercontent.com/u/32532938?v=4","gravatar_id":"","url":"https://api.github.com/users/carnivorous-fuzz","html_url":"https://github.com/carnivorous-fuzz","followers_url":"https://api.github.com/users/carnivorous-fuzz/followers","following_url":"https://api.github.com/users/carnivorous-fuzz/following{/other_user}","gists_url":"https://api.github.com/users/carnivorous-fuzz/gists{/gist_id}","starred_url":"https://api.github.com/users/carnivorous-fuzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carnivorous-fuzz/subscriptions","organizations_url":"https://api.github.com/users/carnivorous-fuzz/orgs","repos_url":"https://api.github.com/users/carnivorous-fuzz/repos","events_url":"https://api.github.com/users/carnivorous-fuzz/events{/privacy}","received_events_url":"https://api.github.com/users/carnivorous-fuzz/received_events","type":"Organization","site_admin":false},"repo":{"id":106034400,"name":"location-messaging","full_name":"carnivorous-fuzz/location-messaging","owner":{"login":"carnivorous-fuzz","id":32532938,"avatar_url":"https://avatars1.githubusercontent.com/u/32532938?v=4","gravatar_id":"","url":"https://api.github.com/users/carnivorous-fuzz","html_url":"https://github.com/carnivorous-fuzz","followers_url":"https://api.github.com/users/carnivorous-fuzz/followers","following_url":"https://api.github.com/users/carnivorous-fuzz/following{/other_user}","gists_url":"https://api.github.com/users/carnivorous-fuzz/gists{/gist_id}","starred_url":"https://api.github.com/users/carnivorous-fuzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carnivorous-fuzz/subscriptions","organizations_url":"https://api.github.com/users/carnivorous-fuzz/orgs","repos_url":"https://api.github.com/users/carnivorous-fuzz/repos","events_url":"https://api.github.com/users/carnivorous-fuzz/events{/privacy}","received_events_url":"https://api.github.com/users/carnivorous-fuzz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/carnivorous-fuzz/location-messaging","description":"iOS location-based media sharing app","fork":false,"url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging","forks_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/forks","keys_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/teams","hooks_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/hooks","issue_events_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues/events{/number}","events_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/events","assignees_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/assignees{/user}","branches_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/branches{/branch}","tags_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/tags","blobs_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/refs{/sha}","trees_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/statuses/{sha}","languages_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/languages","stargazers_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/stargazers","contributors_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/contributors","subscribers_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/subscribers","subscription_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/subscription","commits_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/commits{/sha}","git_commits_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/commits{/sha}","comments_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/comments{/number}","issue_comment_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues/comments{/number}","contents_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/contents/{+path}","compare_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/merges","archive_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/downloads","issues_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues{/number}","pulls_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls{/number}","milestones_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/milestones{/number}","notifications_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/labels{/name}","releases_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/releases{/id}","deployments_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/deployments","created_at":"2017-10-06T17:55:06Z","updated_at":"2017-10-13T02:32:36Z","pushed_at":"2017-10-15T23:10:38Z","git_url":"git://github.com/carnivorous-fuzz/location-messaging.git","ssh_url":"git@github.com:carnivorous-fuzz/location-messaging.git","clone_url":"https://github.com/carnivorous-fuzz/location-messaging.git","svn_url":"https://github.com/carnivorous-fuzz/location-messaging","homepage":null,"size":113,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"carnivorous-fuzz:master","ref":"master","sha":"65c7e11d048d1f674a6b494f8929e4e7087b924f","user":{"login":"carnivorous-fuzz","id":32532938,"avatar_url":"https://avatars1.githubusercontent.com/u/32532938?v=4","gravatar_id":"","url":"https://api.github.com/users/carnivorous-fuzz","html_url":"https://github.com/carnivorous-fuzz","followers_url":"https://api.github.com/users/carnivorous-fuzz/followers","following_url":"https://api.github.com/users/carnivorous-fuzz/following{/other_user}","gists_url":"https://api.github.com/users/carnivorous-fuzz/gists{/gist_id}","starred_url":"https://api.github.com/users/carnivorous-fuzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carnivorous-fuzz/subscriptions","organizations_url":"https://api.github.com/users/carnivorous-fuzz/orgs","repos_url":"https://api.github.com/users/carnivorous-fuzz/repos","events_url":"https://api.github.com/users/carnivorous-fuzz/events{/privacy}","received_events_url":"https://api.github.com/users/carnivorous-fuzz/received_events","type":"Organization","site_admin":false},"repo":{"id":106034400,"name":"location-messaging","full_name":"carnivorous-fuzz/location-messaging","owner":{"login":"carnivorous-fuzz","id":32532938,"avatar_url":"https://avatars1.githubusercontent.com/u/32532938?v=4","gravatar_id":"","url":"https://api.github.com/users/carnivorous-fuzz","html_url":"https://github.com/carnivorous-fuzz","followers_url":"https://api.github.com/users/carnivorous-fuzz/followers","following_url":"https://api.github.com/users/carnivorous-fuzz/following{/other_user}","gists_url":"https://api.github.com/users/carnivorous-fuzz/gists{/gist_id}","starred_url":"https://api.github.com/users/carnivorous-fuzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carnivorous-fuzz/subscriptions","organizations_url":"https://api.github.com/users/carnivorous-fuzz/orgs","repos_url":"https://api.github.com/users/carnivorous-fuzz/repos","events_url":"https://api.github.com/users/carnivorous-fuzz/events{/privacy}","received_events_url":"https://api.github.com/users/carnivorous-fuzz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/carnivorous-fuzz/location-messaging","description":"iOS location-based media sharing app","fork":false,"url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging","forks_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/forks","keys_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/teams","hooks_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/hooks","issue_events_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues/events{/number}","events_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/events","assignees_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/assignees{/user}","branches_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/branches{/branch}","tags_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/tags","blobs_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/refs{/sha}","trees_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/statuses/{sha}","languages_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/languages","stargazers_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/stargazers","contributors_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/contributors","subscribers_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/subscribers","subscription_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/subscription","commits_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/commits{/sha}","git_commits_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/git/commits{/sha}","comments_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/comments{/number}","issue_comment_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues/comments{/number}","contents_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/contents/{+path}","compare_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/merges","archive_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/downloads","issues_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues{/number}","pulls_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls{/number}","milestones_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/milestones{/number}","notifications_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/labels{/name}","releases_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/releases{/id}","deployments_url":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/deployments","created_at":"2017-10-06T17:55:06Z","updated_at":"2017-10-13T02:32:36Z","pushed_at":"2017-10-15T23:10:38Z","git_url":"git://github.com/carnivorous-fuzz/location-messaging.git","ssh_url":"git@github.com:carnivorous-fuzz/location-messaging.git","clone_url":"https://github.com/carnivorous-fuzz/location-messaging.git","svn_url":"https://github.com/carnivorous-fuzz/location-messaging","homepage":null,"size":113,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/10"},"html":{"href":"https://github.com/carnivorous-fuzz/location-messaging/pull/10"},"issue":{"href":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues/10"},"comments":{"href":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/carnivorous-fuzz/location-messaging/statuses/2fcd9e41032d72965d338202e83059b7f0dc3ad5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"huw30"}}