{"action":"created","comment":{"url":"https://api.github.com/repos/bellycard/PopTop/pulls/comments/50440067","id":50440067,"diff_hunk":"@@ -107,7 +112,35 @@ public class Manager: NSURLProtocol {\n         \n         name = pathComponents.joinWithSeparator(separator)\n         name = separator + name!\n+\n+        let query = queryDictionaryFromURL(url)\n         \n-        return (name, ids)\n+        return (name, ids, query)\n+    }\n+\n+    // inspired by https://gist.github.com/freerunnering/1215df277d750af71887\n+    /// Return a dictionary with arrays populated with the values of query parameters. URLs allow keys to be declared multiple times, hence the array container.\n+    static func queryDictionaryFromURL(url: NSURL) -> queryArtifacts {\n+        if let query = url.query {","path":"Source/Manager.swift","position":85,"original_position":85,"commit_id":"1a37039fe1d2a52ae3f5c477cf036387de8d6c5b","original_commit_id":"1a37039fe1d2a52ae3f5c477cf036387de8d6c5b","user":{"login":"ajself","id":1699437,"avatar_url":"https://avatars.githubusercontent.com/u/1699437?v=3","gravatar_id":"","url":"https://api.github.com/users/ajself","html_url":"https://github.com/ajself","followers_url":"https://api.github.com/users/ajself/followers","following_url":"https://api.github.com/users/ajself/following{/other_user}","gists_url":"https://api.github.com/users/ajself/gists{/gist_id}","starred_url":"https://api.github.com/users/ajself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajself/subscriptions","organizations_url":"https://api.github.com/users/ajself/orgs","repos_url":"https://api.github.com/users/ajself/repos","events_url":"https://api.github.com/users/ajself/events{/privacy}","received_events_url":"https://api.github.com/users/ajself/received_events","type":"User","site_admin":false},"body":":+1: I like it. Will fix.","created_at":"2016-01-21T18:21:22Z","updated_at":"2016-01-21T18:21:22Z","html_url":"https://github.com/bellycard/PopTop/pull/27#discussion_r50440067","pull_request_url":"https://api.github.com/repos/bellycard/PopTop/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/bellycard/PopTop/pulls/comments/50440067"},"html":{"href":"https://github.com/bellycard/PopTop/pull/27#discussion_r50440067"},"pull_request":{"href":"https://api.github.com/repos/bellycard/PopTop/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/bellycard/PopTop/pulls/27","id":56669804,"html_url":"https://github.com/bellycard/PopTop/pull/27","diff_url":"https://github.com/bellycard/PopTop/pull/27.diff","patch_url":"https://github.com/bellycard/PopTop/pull/27.patch","issue_url":"https://api.github.com/repos/bellycard/PopTop/issues/27","number":27,"state":"open","locked":false,"title":"Feature/return resource artifacts","user":{"login":"ajself","id":1699437,"avatar_url":"https://avatars.githubusercontent.com/u/1699437?v=3","gravatar_id":"","url":"https://api.github.com/users/ajself","html_url":"https://github.com/ajself","followers_url":"https://api.github.com/users/ajself/followers","following_url":"https://api.github.com/users/ajself/following{/other_user}","gists_url":"https://api.github.com/users/ajself/gists{/gist_id}","starred_url":"https://api.github.com/users/ajself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajself/subscriptions","organizations_url":"https://api.github.com/users/ajself/orgs","repos_url":"https://api.github.com/users/ajself/repos","events_url":"https://api.github.com/users/ajself/events{/privacy}","received_events_url":"https://api.github.com/users/ajself/received_events","type":"User","site_admin":false},"body":"@bellycard/mobile This PR knocks out a few things and resolves some pain. Any tokens you may see in this PR are invalidated already.\r\n\r\n- [x] Remove `name` from tuple provided to Resource data method as it is the exact same string as the instance of the Resource's `resourceIdentifier` property.\r\n\r\n- [x] Return a dictionary of query params to the Resource instance.\r\n\r\n- [x] Make the JSONFromFile a class so the file can be lazy loaded\r\n\r\n- [x] Ability to remove a single Resource from the Manager collection","created_at":"2016-01-20T21:27:35Z","updated_at":"2016-01-21T18:21:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35eb00f9cb7a6c629cbb7971f550ac1b46216e2d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bellycard/PopTop/pulls/27/commits","review_comments_url":"https://api.github.com/repos/bellycard/PopTop/pulls/27/comments","review_comment_url":"https://api.github.com/repos/bellycard/PopTop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bellycard/PopTop/issues/27/comments","statuses_url":"https://api.github.com/repos/bellycard/PopTop/statuses/1a37039fe1d2a52ae3f5c477cf036387de8d6c5b","head":{"label":"ajself:feature/return-resource-artifacts","ref":"feature/return-resource-artifacts","sha":"1a37039fe1d2a52ae3f5c477cf036387de8d6c5b","user":{"login":"ajself","id":1699437,"avatar_url":"https://avatars.githubusercontent.com/u/1699437?v=3","gravatar_id":"","url":"https://api.github.com/users/ajself","html_url":"https://github.com/ajself","followers_url":"https://api.github.com/users/ajself/followers","following_url":"https://api.github.com/users/ajself/following{/other_user}","gists_url":"https://api.github.com/users/ajself/gists{/gist_id}","starred_url":"https://api.github.com/users/ajself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajself/subscriptions","organizations_url":"https://api.github.com/users/ajself/orgs","repos_url":"https://api.github.com/users/ajself/repos","events_url":"https://api.github.com/users/ajself/events{/privacy}","received_events_url":"https://api.github.com/users/ajself/received_events","type":"User","site_admin":false},"repo":{"id":50061192,"name":"PopTop","full_name":"ajself/PopTop","owner":{"login":"ajself","id":1699437,"avatar_url":"https://avatars.githubusercontent.com/u/1699437?v=3","gravatar_id":"","url":"https://api.github.com/users/ajself","html_url":"https://github.com/ajself","followers_url":"https://api.github.com/users/ajself/followers","following_url":"https://api.github.com/users/ajself/following{/other_user}","gists_url":"https://api.github.com/users/ajself/gists{/gist_id}","starred_url":"https://api.github.com/users/ajself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajself/subscriptions","organizations_url":"https://api.github.com/users/ajself/orgs","repos_url":"https://api.github.com/users/ajself/repos","events_url":"https://api.github.com/users/ajself/events{/privacy}","received_events_url":"https://api.github.com/users/ajself/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajself/PopTop","description":"PopTop makes serving canned responses easy","fork":true,"url":"https://api.github.com/repos/ajself/PopTop","forks_url":"https://api.github.com/repos/ajself/PopTop/forks","keys_url":"https://api.github.com/repos/ajself/PopTop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajself/PopTop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajself/PopTop/teams","hooks_url":"https://api.github.com/repos/ajself/PopTop/hooks","issue_events_url":"https://api.github.com/repos/ajself/PopTop/issues/events{/number}","events_url":"https://api.github.com/repos/ajself/PopTop/events","assignees_url":"https://api.github.com/repos/ajself/PopTop/assignees{/user}","branches_url":"https://api.github.com/repos/ajself/PopTop/branches{/branch}","tags_url":"https://api.github.com/repos/ajself/PopTop/tags","blobs_url":"https://api.github.com/repos/ajself/PopTop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajself/PopTop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajself/PopTop/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajself/PopTop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajself/PopTop/statuses/{sha}","languages_url":"https://api.github.com/repos/ajself/PopTop/languages","stargazers_url":"https://api.github.com/repos/ajself/PopTop/stargazers","contributors_url":"https://api.github.com/repos/ajself/PopTop/contributors","subscribers_url":"https://api.github.com/repos/ajself/PopTop/subscribers","subscription_url":"https://api.github.com/repos/ajself/PopTop/subscription","commits_url":"https://api.github.com/repos/ajself/PopTop/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajself/PopTop/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajself/PopTop/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajself/PopTop/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajself/PopTop/contents/{+path}","compare_url":"https://api.github.com/repos/ajself/PopTop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajself/PopTop/merges","archive_url":"https://api.github.com/repos/ajself/PopTop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajself/PopTop/downloads","issues_url":"https://api.github.com/repos/ajself/PopTop/issues{/number}","pulls_url":"https://api.github.com/repos/ajself/PopTop/pulls{/number}","milestones_url":"https://api.github.com/repos/ajself/PopTop/milestones{/number}","notifications_url":"https://api.github.com/repos/ajself/PopTop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajself/PopTop/labels{/name}","releases_url":"https://api.github.com/repos/ajself/PopTop/releases{/id}","created_at":"2016-01-20T21:23:29Z","updated_at":"2016-01-20T21:23:29Z","pushed_at":"2016-01-20T21:23:43Z","git_url":"git://github.com/ajself/PopTop.git","ssh_url":"git@github.com:ajself/PopTop.git","clone_url":"https://github.com/ajself/PopTop.git","svn_url":"https://github.com/ajself/PopTop","homepage":null,"size":56,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"bellycard:development","ref":"development","sha":"a36af8bb691df024ef4dec632cc8c3b1122df57c","user":{"login":"bellycard","id":1090217,"avatar_url":"https://avatars.githubusercontent.com/u/1090217?v=3","gravatar_id":"","url":"https://api.github.com/users/bellycard","html_url":"https://github.com/bellycard","followers_url":"https://api.github.com/users/bellycard/followers","following_url":"https://api.github.com/users/bellycard/following{/other_user}","gists_url":"https://api.github.com/users/bellycard/gists{/gist_id}","starred_url":"https://api.github.com/users/bellycard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bellycard/subscriptions","organizations_url":"https://api.github.com/users/bellycard/orgs","repos_url":"https://api.github.com/users/bellycard/repos","events_url":"https://api.github.com/users/bellycard/events{/privacy}","received_events_url":"https://api.github.com/users/bellycard/received_events","type":"Organization","site_admin":false},"repo":{"id":44117980,"name":"PopTop","full_name":"bellycard/PopTop","owner":{"login":"bellycard","id":1090217,"avatar_url":"https://avatars.githubusercontent.com/u/1090217?v=3","gravatar_id":"","url":"https://api.github.com/users/bellycard","html_url":"https://github.com/bellycard","followers_url":"https://api.github.com/users/bellycard/followers","following_url":"https://api.github.com/users/bellycard/following{/other_user}","gists_url":"https://api.github.com/users/bellycard/gists{/gist_id}","starred_url":"https://api.github.com/users/bellycard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bellycard/subscriptions","organizations_url":"https://api.github.com/users/bellycard/orgs","repos_url":"https://api.github.com/users/bellycard/repos","events_url":"https://api.github.com/users/bellycard/events{/privacy}","received_events_url":"https://api.github.com/users/bellycard/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bellycard/PopTop","description":"PopTop makes serving canned responses easy","fork":false,"url":"https://api.github.com/repos/bellycard/PopTop","forks_url":"https://api.github.com/repos/bellycard/PopTop/forks","keys_url":"https://api.github.com/repos/bellycard/PopTop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bellycard/PopTop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bellycard/PopTop/teams","hooks_url":"https://api.github.com/repos/bellycard/PopTop/hooks","issue_events_url":"https://api.github.com/repos/bellycard/PopTop/issues/events{/number}","events_url":"https://api.github.com/repos/bellycard/PopTop/events","assignees_url":"https://api.github.com/repos/bellycard/PopTop/assignees{/user}","branches_url":"https://api.github.com/repos/bellycard/PopTop/branches{/branch}","tags_url":"https://api.github.com/repos/bellycard/PopTop/tags","blobs_url":"https://api.github.com/repos/bellycard/PopTop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bellycard/PopTop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bellycard/PopTop/git/refs{/sha}","trees_url":"https://api.github.com/repos/bellycard/PopTop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bellycard/PopTop/statuses/{sha}","languages_url":"https://api.github.com/repos/bellycard/PopTop/languages","stargazers_url":"https://api.github.com/repos/bellycard/PopTop/stargazers","contributors_url":"https://api.github.com/repos/bellycard/PopTop/contributors","subscribers_url":"https://api.github.com/repos/bellycard/PopTop/subscribers","subscription_url":"https://api.github.com/repos/bellycard/PopTop/subscription","commits_url":"https://api.github.com/repos/bellycard/PopTop/commits{/sha}","git_commits_url":"https://api.github.com/repos/bellycard/PopTop/git/commits{/sha}","comments_url":"https://api.github.com/repos/bellycard/PopTop/comments{/number}","issue_comment_url":"https://api.github.com/repos/bellycard/PopTop/issues/comments{/number}","contents_url":"https://api.github.com/repos/bellycard/PopTop/contents/{+path}","compare_url":"https://api.github.com/repos/bellycard/PopTop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bellycard/PopTop/merges","archive_url":"https://api.github.com/repos/bellycard/PopTop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bellycard/PopTop/downloads","issues_url":"https://api.github.com/repos/bellycard/PopTop/issues{/number}","pulls_url":"https://api.github.com/repos/bellycard/PopTop/pulls{/number}","milestones_url":"https://api.github.com/repos/bellycard/PopTop/milestones{/number}","notifications_url":"https://api.github.com/repos/bellycard/PopTop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bellycard/PopTop/labels{/name}","releases_url":"https://api.github.com/repos/bellycard/PopTop/releases{/id}","created_at":"2015-10-12T15:56:24Z","updated_at":"2016-01-19T20:40:56Z","pushed_at":"2016-01-20T21:27:35Z","git_url":"git://github.com/bellycard/PopTop.git","ssh_url":"git@github.com:bellycard/PopTop.git","clone_url":"https://github.com/bellycard/PopTop.git","svn_url":"https://github.com/bellycard/PopTop","homepage":null,"size":53,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"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/bellycard/PopTop/pulls/27"},"html":{"href":"https://github.com/bellycard/PopTop/pull/27"},"issue":{"href":"https://api.github.com/repos/bellycard/PopTop/issues/27"},"comments":{"href":"https://api.github.com/repos/bellycard/PopTop/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/bellycard/PopTop/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/bellycard/PopTop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bellycard/PopTop/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/bellycard/PopTop/statuses/1a37039fe1d2a52ae3f5c477cf036387de8d6c5b"}}}}