{"action":"opened","number":62,"pull_request":{"url":"https://api.github.com/repos/jsbean/HansTools/pulls/62","id":94496939,"html_url":"https://github.com/jsbean/HansTools/pull/62","diff_url":"https://github.com/jsbean/HansTools/pull/62.diff","patch_url":"https://github.com/jsbean/HansTools/pull/62.patch","issue_url":"https://api.github.com/repos/jsbean/HansTools/issues/62","number":62,"state":"open","locked":false,"title":"Refactor the storage of Event values","user":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"body":"Prior, all `Event` values were stored in an `enum` with `static` properties and methods.\r\n\r\nThis was working nicely, up until more sophisticated iteration functionality was needed. To benefit from iteration, a structure that is initializable is needed.\r\n\r\nAs such, the `EventCollection` structure was created. The internal data is a singleton which can only be set privately (within the `EventCollection` structure). \r\n\r\nTo use, initialize a instance of `EventCollection` as such:\r\n\r\n```Swift\r\nlet events = EventCollection()\r\n```\r\n\r\nThen, you can reap the benefits of the `Sequence` and `Collection` protocols:\r\n\r\n```Swift\r\nlet soundFileNames = events.map { $0.soundFileName } \r\nlet amountOfEvents = events.count\r\n```\r\n\r\nBut also, no matter where you initialize an instance of `EventCollection` within the app, the underlying data will be the same.\r\n\r\nIn our case, we populate the underlying data for `EventCollection` from the local file system (after ensuring that all audio files have been downloaded).\r\n","created_at":"2016-11-19T21:55:11Z","updated_at":"2016-11-19T21:55:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jsbean/HansTools/pulls/62/commits","review_comments_url":"https://api.github.com/repos/jsbean/HansTools/pulls/62/comments","review_comment_url":"https://api.github.com/repos/jsbean/HansTools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jsbean/HansTools/issues/62/comments","statuses_url":"https://api.github.com/repos/jsbean/HansTools/statuses/e84422d4745d100527582b87eed42618243cdfee","head":{"label":"jsbean:event-collection","ref":"event-collection","sha":"e84422d4745d100527582b87eed42618243cdfee","user":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"repo":{"id":56884104,"name":"HansTools","full_name":"jsbean/HansTools","owner":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsbean/HansTools","description":"Tools for Hans compositions","fork":false,"url":"https://api.github.com/repos/jsbean/HansTools","forks_url":"https://api.github.com/repos/jsbean/HansTools/forks","keys_url":"https://api.github.com/repos/jsbean/HansTools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsbean/HansTools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsbean/HansTools/teams","hooks_url":"https://api.github.com/repos/jsbean/HansTools/hooks","issue_events_url":"https://api.github.com/repos/jsbean/HansTools/issues/events{/number}","events_url":"https://api.github.com/repos/jsbean/HansTools/events","assignees_url":"https://api.github.com/repos/jsbean/HansTools/assignees{/user}","branches_url":"https://api.github.com/repos/jsbean/HansTools/branches{/branch}","tags_url":"https://api.github.com/repos/jsbean/HansTools/tags","blobs_url":"https://api.github.com/repos/jsbean/HansTools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsbean/HansTools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsbean/HansTools/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsbean/HansTools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsbean/HansTools/statuses/{sha}","languages_url":"https://api.github.com/repos/jsbean/HansTools/languages","stargazers_url":"https://api.github.com/repos/jsbean/HansTools/stargazers","contributors_url":"https://api.github.com/repos/jsbean/HansTools/contributors","subscribers_url":"https://api.github.com/repos/jsbean/HansTools/subscribers","subscription_url":"https://api.github.com/repos/jsbean/HansTools/subscription","commits_url":"https://api.github.com/repos/jsbean/HansTools/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsbean/HansTools/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsbean/HansTools/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsbean/HansTools/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsbean/HansTools/contents/{+path}","compare_url":"https://api.github.com/repos/jsbean/HansTools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsbean/HansTools/merges","archive_url":"https://api.github.com/repos/jsbean/HansTools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsbean/HansTools/downloads","issues_url":"https://api.github.com/repos/jsbean/HansTools/issues{/number}","pulls_url":"https://api.github.com/repos/jsbean/HansTools/pulls{/number}","milestones_url":"https://api.github.com/repos/jsbean/HansTools/milestones{/number}","notifications_url":"https://api.github.com/repos/jsbean/HansTools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsbean/HansTools/labels{/name}","releases_url":"https://api.github.com/repos/jsbean/HansTools/releases{/id}","deployments_url":"https://api.github.com/repos/jsbean/HansTools/deployments","created_at":"2016-04-22T20:43:21Z","updated_at":"2016-11-04T16:16:31Z","pushed_at":"2016-11-19T21:48:17Z","git_url":"git://github.com/jsbean/HansTools.git","ssh_url":"git@github.com:jsbean/HansTools.git","clone_url":"https://github.com/jsbean/HansTools.git","svn_url":"https://github.com/jsbean/HansTools","homepage":null,"size":211523,"stargazers_count":1,"watchers_count":1,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":15,"forks":1,"open_issues":15,"watchers":1,"default_branch":"master"}},"base":{"label":"jsbean:master","ref":"master","sha":"74a7e60bc9a68d9c78300f835eced200da0fe433","user":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"repo":{"id":56884104,"name":"HansTools","full_name":"jsbean/HansTools","owner":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsbean/HansTools","description":"Tools for Hans compositions","fork":false,"url":"https://api.github.com/repos/jsbean/HansTools","forks_url":"https://api.github.com/repos/jsbean/HansTools/forks","keys_url":"https://api.github.com/repos/jsbean/HansTools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsbean/HansTools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsbean/HansTools/teams","hooks_url":"https://api.github.com/repos/jsbean/HansTools/hooks","issue_events_url":"https://api.github.com/repos/jsbean/HansTools/issues/events{/number}","events_url":"https://api.github.com/repos/jsbean/HansTools/events","assignees_url":"https://api.github.com/repos/jsbean/HansTools/assignees{/user}","branches_url":"https://api.github.com/repos/jsbean/HansTools/branches{/branch}","tags_url":"https://api.github.com/repos/jsbean/HansTools/tags","blobs_url":"https://api.github.com/repos/jsbean/HansTools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsbean/HansTools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsbean/HansTools/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsbean/HansTools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsbean/HansTools/statuses/{sha}","languages_url":"https://api.github.com/repos/jsbean/HansTools/languages","stargazers_url":"https://api.github.com/repos/jsbean/HansTools/stargazers","contributors_url":"https://api.github.com/repos/jsbean/HansTools/contributors","subscribers_url":"https://api.github.com/repos/jsbean/HansTools/subscribers","subscription_url":"https://api.github.com/repos/jsbean/HansTools/subscription","commits_url":"https://api.github.com/repos/jsbean/HansTools/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsbean/HansTools/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsbean/HansTools/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsbean/HansTools/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsbean/HansTools/contents/{+path}","compare_url":"https://api.github.com/repos/jsbean/HansTools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsbean/HansTools/merges","archive_url":"https://api.github.com/repos/jsbean/HansTools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsbean/HansTools/downloads","issues_url":"https://api.github.com/repos/jsbean/HansTools/issues{/number}","pulls_url":"https://api.github.com/repos/jsbean/HansTools/pulls{/number}","milestones_url":"https://api.github.com/repos/jsbean/HansTools/milestones{/number}","notifications_url":"https://api.github.com/repos/jsbean/HansTools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsbean/HansTools/labels{/name}","releases_url":"https://api.github.com/repos/jsbean/HansTools/releases{/id}","deployments_url":"https://api.github.com/repos/jsbean/HansTools/deployments","created_at":"2016-04-22T20:43:21Z","updated_at":"2016-11-04T16:16:31Z","pushed_at":"2016-11-19T21:48:17Z","git_url":"git://github.com/jsbean/HansTools.git","ssh_url":"git@github.com:jsbean/HansTools.git","clone_url":"https://github.com/jsbean/HansTools.git","svn_url":"https://github.com/jsbean/HansTools","homepage":null,"size":211523,"stargazers_count":1,"watchers_count":1,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":15,"forks":1,"open_issues":15,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jsbean/HansTools/pulls/62"},"html":{"href":"https://github.com/jsbean/HansTools/pull/62"},"issue":{"href":"https://api.github.com/repos/jsbean/HansTools/issues/62"},"comments":{"href":"https://api.github.com/repos/jsbean/HansTools/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/jsbean/HansTools/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/jsbean/HansTools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jsbean/HansTools/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/jsbean/HansTools/statuses/e84422d4745d100527582b87eed42618243cdfee"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":7,"additions":280,"deletions":181,"changed_files":8}}
{"actor":{"display_login":"jsbean"}}