{"action":"created","comment":{"url":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/comments/26630368","id":26630368,"diff_hunk":"@@ -0,0 +1,89 @@\n+//\n+//  QuestListTableViewController.m\n+//  MH4U Dex\n+//\n+//  Created by Joseph Goldberg on 3/16/15.\n+//  Copyright (c) 2015 Joseph Goldberg. All rights reserved.\n+//\n+\n+#import \"QuestListTableViewController.h\"\n+\n+#import <CoreData/CoreData.h>\n+\n+#import \"CoreDataController.h\"\n+\n+#import \"Quest.h\"\n+\n+#import \"QuestListTableViewCell.h\"\n+\n+typedef NS_ENUM(NSInteger, StarSections) {\n+    OneStarSection = 0,\n+    TwoStarSection = 1,\n+    ThreeStarSection = 2,\n+    FourStarSection = 3,\n+    FiveStarSection = 4,\n+    SixStarSection = 5,\n+    SevenStarSection = 6,\n+    EightStarSection = 7,\n+    NineStarSection = 8,\n+    TenStarSection = 9,\n+    \n+    StarSectionCount\n+};\n+\n+@interface QuestListTableViewController ()\n+\n+@property (nonatomic, strong) NSMutableArray *questMasterArray;\n+\n+@end\n+\n+@implementation QuestListTableViewController\n+\n+- (void)viewDidLoad\n+{\n+    [super viewDidLoad];\n+    \n+    \n+    \n+    CoreDataController *coreDataController = [CoreDataController sharedCDController];\n+    NSError *fetchError = nil;\n+    NSPredicate *caravanPredicate = [NSPredicate predicateWithFormat:@\"%K == %@\", QuestAttributes.caravan, [NSNumber numberWithBool:self.isCaravan]];\n+    NSFetchRequest *questFetchRequest = [NSFetchRequest fetchRequestWithEntityName:[Quest entityName]];\n+    self.questMasterArray = [NSMutableArray array];\n+    NSPredicate *starPredicate;\n+    NSCompoundPredicate *compoundPredicate;\n+    for (NSUInteger starNumber = 1; starNumber <= 10; starNumber++) {\n+        starPredicate = [NSPredicate predicateWithFormat:@\"%K == %@\", QuestAttributes.stars, @(starNumber)];\n+        compoundPredicate = [NSCompoundPredicate andPredicateWithSubpredicates:@[caravanPredicate, starPredicate]];\n+        [questFetchRequest setPredicate:compoundPredicate];\n+        [self.questMasterArray addObject:[coreDataController.managedObjectContext executeFetchRequest:questFetchRequest error:&fetchError]];;","path":"MH4U Dex/QuestListTableViewController.m","position":59,"original_position":59,"commit_id":"670cf281cee24e05e8e86ba4a3761657421d8448","original_commit_id":"670cf281cee24e05e8e86ba4a3761657421d8448","user":{"login":"vokal-isaac","id":7505072,"avatar_url":"https://avatars.githubusercontent.com/u/7505072?v=3","gravatar_id":"","url":"https://api.github.com/users/vokal-isaac","html_url":"https://github.com/vokal-isaac","followers_url":"https://api.github.com/users/vokal-isaac/followers","following_url":"https://api.github.com/users/vokal-isaac/following{/other_user}","gists_url":"https://api.github.com/users/vokal-isaac/gists{/gist_id}","starred_url":"https://api.github.com/users/vokal-isaac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vokal-isaac/subscriptions","organizations_url":"https://api.github.com/users/vokal-isaac/orgs","repos_url":"https://api.github.com/users/vokal-isaac/repos","events_url":"https://api.github.com/users/vokal-isaac/events{/privacy}","received_events_url":"https://api.github.com/users/vokal-isaac/received_events","type":"User","site_admin":false},"body":"`executeFetchRequest:error:` might return `nil`, which would cause a crash for attempting to insert `nil` into an array.  You might also want to do something with `fetchError` when it returns `nil`.","created_at":"2015-03-18T00:46:18Z","updated_at":"2015-03-18T00:46:18Z","html_url":"https://github.com/vokal/MH4U-Dex/pull/2#discussion_r26630368","pull_request_url":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/comments/26630368"},"html":{"href":"https://github.com/vokal/MH4U-Dex/pull/2#discussion_r26630368"},"pull_request":{"href":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/2","id":31067140,"html_url":"https://github.com/vokal/MH4U-Dex/pull/2","diff_url":"https://github.com/vokal/MH4U-Dex/pull/2.diff","patch_url":"https://github.com/vokal/MH4U-Dex/pull/2.patch","issue_url":"https://api.github.com/repos/vokal/MH4U-Dex/issues/2","number":2,"state":"open","locked":false,"title":"Fundamentals of regions are in.  Also, a lot of new JSON files.","user":{"login":"jmgoldb","id":10276487,"avatar_url":"https://avatars.githubusercontent.com/u/10276487?v=3","gravatar_id":"","url":"https://api.github.com/users/jmgoldb","html_url":"https://github.com/jmgoldb","followers_url":"https://api.github.com/users/jmgoldb/followers","following_url":"https://api.github.com/users/jmgoldb/following{/other_user}","gists_url":"https://api.github.com/users/jmgoldb/gists{/gist_id}","starred_url":"https://api.github.com/users/jmgoldb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmgoldb/subscriptions","organizations_url":"https://api.github.com/users/jmgoldb/orgs","repos_url":"https://api.github.com/users/jmgoldb/repos","events_url":"https://api.github.com/users/jmgoldb/events{/privacy}","received_events_url":"https://api.github.com/users/jmgoldb/received_events","type":"User","site_admin":false},"body":"Making a pull request early so we can get these JSON files.  Next I am going to set up the distinction of low, high, and g-rank region views, by subclassing the view controller I made.  I considered instead just having one view controller able to handle everything, but that would lead to needless complexity.","created_at":"2015-03-12T19:01:14Z","updated_at":"2015-03-18T00:46:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0badcaf2666bb0625093acdfce75eba7c29d2cd5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/2/commits","review_comments_url":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/2/comments","review_comment_url":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vokal/MH4U-Dex/issues/2/comments","statuses_url":"https://api.github.com/repos/vokal/MH4U-Dex/statuses/670cf281cee24e05e8e86ba4a3761657421d8448","head":{"label":"jmgoldb:master","ref":"master","sha":"670cf281cee24e05e8e86ba4a3761657421d8448","user":{"login":"jmgoldb","id":10276487,"avatar_url":"https://avatars.githubusercontent.com/u/10276487?v=3","gravatar_id":"","url":"https://api.github.com/users/jmgoldb","html_url":"https://github.com/jmgoldb","followers_url":"https://api.github.com/users/jmgoldb/followers","following_url":"https://api.github.com/users/jmgoldb/following{/other_user}","gists_url":"https://api.github.com/users/jmgoldb/gists{/gist_id}","starred_url":"https://api.github.com/users/jmgoldb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmgoldb/subscriptions","organizations_url":"https://api.github.com/users/jmgoldb/orgs","repos_url":"https://api.github.com/users/jmgoldb/repos","events_url":"https://api.github.com/users/jmgoldb/events{/privacy}","received_events_url":"https://api.github.com/users/jmgoldb/received_events","type":"User","site_admin":false},"repo":{"id":30926106,"name":"MH4U-Dex","full_name":"jmgoldb/MH4U-Dex","owner":{"login":"jmgoldb","id":10276487,"avatar_url":"https://avatars.githubusercontent.com/u/10276487?v=3","gravatar_id":"","url":"https://api.github.com/users/jmgoldb","html_url":"https://github.com/jmgoldb","followers_url":"https://api.github.com/users/jmgoldb/followers","following_url":"https://api.github.com/users/jmgoldb/following{/other_user}","gists_url":"https://api.github.com/users/jmgoldb/gists{/gist_id}","starred_url":"https://api.github.com/users/jmgoldb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmgoldb/subscriptions","organizations_url":"https://api.github.com/users/jmgoldb/orgs","repos_url":"https://api.github.com/users/jmgoldb/repos","events_url":"https://api.github.com/users/jmgoldb/events{/privacy}","received_events_url":"https://api.github.com/users/jmgoldb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmgoldb/MH4U-Dex","description":"Joseph Goldberg's apprentice project. ","fork":true,"url":"https://api.github.com/repos/jmgoldb/MH4U-Dex","forks_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/forks","keys_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/teams","hooks_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/hooks","issue_events_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/issues/events{/number}","events_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/events","assignees_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/assignees{/user}","branches_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/branches{/branch}","tags_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/tags","blobs_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/statuses/{sha}","languages_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/languages","stargazers_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/stargazers","contributors_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/contributors","subscribers_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/subscribers","subscription_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/subscription","commits_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/contents/{+path}","compare_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/merges","archive_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/downloads","issues_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/issues{/number}","pulls_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/pulls{/number}","milestones_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/milestones{/number}","notifications_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/labels{/name}","releases_url":"https://api.github.com/repos/jmgoldb/MH4U-Dex/releases{/id}","created_at":"2015-02-17T16:36:09Z","updated_at":"2015-03-17T18:30:06Z","pushed_at":"2015-03-17T18:30:06Z","git_url":"git://github.com/jmgoldb/MH4U-Dex.git","ssh_url":"git@github.com:jmgoldb/MH4U-Dex.git","clone_url":"https://github.com/jmgoldb/MH4U-Dex.git","svn_url":"https://github.com/jmgoldb/MH4U-Dex","homepage":null,"size":396,"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":"vokal:master","ref":"master","sha":"d13bcf7fbad9d3a54b9f498c09e64678c4a7aaaa","user":{"login":"vokal","id":375026,"avatar_url":"https://avatars.githubusercontent.com/u/375026?v=3","gravatar_id":"","url":"https://api.github.com/users/vokal","html_url":"https://github.com/vokal","followers_url":"https://api.github.com/users/vokal/followers","following_url":"https://api.github.com/users/vokal/following{/other_user}","gists_url":"https://api.github.com/users/vokal/gists{/gist_id}","starred_url":"https://api.github.com/users/vokal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vokal/subscriptions","organizations_url":"https://api.github.com/users/vokal/orgs","repos_url":"https://api.github.com/users/vokal/repos","events_url":"https://api.github.com/users/vokal/events{/privacy}","received_events_url":"https://api.github.com/users/vokal/received_events","type":"Organization","site_admin":false},"repo":{"id":30926028,"name":"MH4U-Dex","full_name":"vokal/MH4U-Dex","owner":{"login":"vokal","id":375026,"avatar_url":"https://avatars.githubusercontent.com/u/375026?v=3","gravatar_id":"","url":"https://api.github.com/users/vokal","html_url":"https://github.com/vokal","followers_url":"https://api.github.com/users/vokal/followers","following_url":"https://api.github.com/users/vokal/following{/other_user}","gists_url":"https://api.github.com/users/vokal/gists{/gist_id}","starred_url":"https://api.github.com/users/vokal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vokal/subscriptions","organizations_url":"https://api.github.com/users/vokal/orgs","repos_url":"https://api.github.com/users/vokal/repos","events_url":"https://api.github.com/users/vokal/events{/privacy}","received_events_url":"https://api.github.com/users/vokal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vokal/MH4U-Dex","description":"Joseph Goldberg's apprentice project. ","fork":false,"url":"https://api.github.com/repos/vokal/MH4U-Dex","forks_url":"https://api.github.com/repos/vokal/MH4U-Dex/forks","keys_url":"https://api.github.com/repos/vokal/MH4U-Dex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vokal/MH4U-Dex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vokal/MH4U-Dex/teams","hooks_url":"https://api.github.com/repos/vokal/MH4U-Dex/hooks","issue_events_url":"https://api.github.com/repos/vokal/MH4U-Dex/issues/events{/number}","events_url":"https://api.github.com/repos/vokal/MH4U-Dex/events","assignees_url":"https://api.github.com/repos/vokal/MH4U-Dex/assignees{/user}","branches_url":"https://api.github.com/repos/vokal/MH4U-Dex/branches{/branch}","tags_url":"https://api.github.com/repos/vokal/MH4U-Dex/tags","blobs_url":"https://api.github.com/repos/vokal/MH4U-Dex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vokal/MH4U-Dex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vokal/MH4U-Dex/git/refs{/sha}","trees_url":"https://api.github.com/repos/vokal/MH4U-Dex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vokal/MH4U-Dex/statuses/{sha}","languages_url":"https://api.github.com/repos/vokal/MH4U-Dex/languages","stargazers_url":"https://api.github.com/repos/vokal/MH4U-Dex/stargazers","contributors_url":"https://api.github.com/repos/vokal/MH4U-Dex/contributors","subscribers_url":"https://api.github.com/repos/vokal/MH4U-Dex/subscribers","subscription_url":"https://api.github.com/repos/vokal/MH4U-Dex/subscription","commits_url":"https://api.github.com/repos/vokal/MH4U-Dex/commits{/sha}","git_commits_url":"https://api.github.com/repos/vokal/MH4U-Dex/git/commits{/sha}","comments_url":"https://api.github.com/repos/vokal/MH4U-Dex/comments{/number}","issue_comment_url":"https://api.github.com/repos/vokal/MH4U-Dex/issues/comments{/number}","contents_url":"https://api.github.com/repos/vokal/MH4U-Dex/contents/{+path}","compare_url":"https://api.github.com/repos/vokal/MH4U-Dex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vokal/MH4U-Dex/merges","archive_url":"https://api.github.com/repos/vokal/MH4U-Dex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vokal/MH4U-Dex/downloads","issues_url":"https://api.github.com/repos/vokal/MH4U-Dex/issues{/number}","pulls_url":"https://api.github.com/repos/vokal/MH4U-Dex/pulls{/number}","milestones_url":"https://api.github.com/repos/vokal/MH4U-Dex/milestones{/number}","notifications_url":"https://api.github.com/repos/vokal/MH4U-Dex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vokal/MH4U-Dex/labels{/name}","releases_url":"https://api.github.com/repos/vokal/MH4U-Dex/releases{/id}","created_at":"2015-02-17T16:34:05Z","updated_at":"2015-03-12T02:12:15Z","pushed_at":"2015-03-12T02:12:15Z","git_url":"git://github.com/vokal/MH4U-Dex.git","ssh_url":"git@github.com:vokal/MH4U-Dex.git","clone_url":"https://github.com/vokal/MH4U-Dex.git","svn_url":"https://github.com/vokal/MH4U-Dex","homepage":null,"size":337,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/2"},"html":{"href":"https://github.com/vokal/MH4U-Dex/pull/2"},"issue":{"href":"https://api.github.com/repos/vokal/MH4U-Dex/issues/2"},"comments":{"href":"https://api.github.com/repos/vokal/MH4U-Dex/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vokal/MH4U-Dex/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/vokal/MH4U-Dex/statuses/670cf281cee24e05e8e86ba4a3761657421d8448"}}}}