{"action":"opened","number":51,"pull_request":{"url":"https://api.github.com/repos/twg/devour/pulls/51","id":76928019,"html_url":"https://github.com/twg/devour/pull/51","diff_url":"https://github.com/twg/devour/pull/51.diff","patch_url":"https://github.com/twg/devour/pull/51.patch","issue_url":"https://api.github.com/repos/twg/devour/issues/51","number":51,"state":"open","locked":false,"title":"add type property to deserialized resource","user":{"login":"mrbabbs","id":2573159,"avatar_url":"https://avatars.githubusercontent.com/u/2573159?v=3","gravatar_id":"","url":"https://api.github.com/users/mrbabbs","html_url":"https://github.com/mrbabbs","followers_url":"https://api.github.com/users/mrbabbs/followers","following_url":"https://api.github.com/users/mrbabbs/following{/other_user}","gists_url":"https://api.github.com/users/mrbabbs/gists{/gist_id}","starred_url":"https://api.github.com/users/mrbabbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrbabbs/subscriptions","organizations_url":"https://api.github.com/users/mrbabbs/orgs","repos_url":"https://api.github.com/users/mrbabbs/repos","events_url":"https://api.github.com/users/mrbabbs/events{/privacy}","received_events_url":"https://api.github.com/users/mrbabbs/received_events","type":"User","site_admin":false},"body":"## Priority\r\nYes, to be able to parse polymorphic relationships and give back the specific type of it\r\n\r\n## What Changed & Why\r\nWhen a `resource` is deserialized, I just added the `type` of the received data in the returned `object`.\r\n\r\nThe reason is that the `name` of the `attribute` used for the `relationship` in some case (`polymorphic relationship`) does not match with the type of data itself.\r\nExample: http://jsonapi.org/format/#document-resource-object-relationships (look the example they wrote `relationship: author` -> `type: 'people'`)\r\nSo to be able to know the specific type of the `relationship` I need to have the `type` of the `attribute` in the `deserialized object`","created_at":"2016-07-11T10:02:52Z","updated_at":"2016-07-11T10:02:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/twg/devour/pulls/51/commits","review_comments_url":"https://api.github.com/repos/twg/devour/pulls/51/comments","review_comment_url":"https://api.github.com/repos/twg/devour/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twg/devour/issues/51/comments","statuses_url":"https://api.github.com/repos/twg/devour/statuses/38e6a8143fb4ad276cb6518cc611c3a49f2a6bcc","head":{"label":"mrbabbs:bug/missing-type-deserilized-resource","ref":"bug/missing-type-deserilized-resource","sha":"38e6a8143fb4ad276cb6518cc611c3a49f2a6bcc","user":{"login":"mrbabbs","id":2573159,"avatar_url":"https://avatars.githubusercontent.com/u/2573159?v=3","gravatar_id":"","url":"https://api.github.com/users/mrbabbs","html_url":"https://github.com/mrbabbs","followers_url":"https://api.github.com/users/mrbabbs/followers","following_url":"https://api.github.com/users/mrbabbs/following{/other_user}","gists_url":"https://api.github.com/users/mrbabbs/gists{/gist_id}","starred_url":"https://api.github.com/users/mrbabbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrbabbs/subscriptions","organizations_url":"https://api.github.com/users/mrbabbs/orgs","repos_url":"https://api.github.com/users/mrbabbs/repos","events_url":"https://api.github.com/users/mrbabbs/events{/privacy}","received_events_url":"https://api.github.com/users/mrbabbs/received_events","type":"User","site_admin":false},"repo":{"id":62307910,"name":"devour","full_name":"mrbabbs/devour","owner":{"login":"mrbabbs","id":2573159,"avatar_url":"https://avatars.githubusercontent.com/u/2573159?v=3","gravatar_id":"","url":"https://api.github.com/users/mrbabbs","html_url":"https://github.com/mrbabbs","followers_url":"https://api.github.com/users/mrbabbs/followers","following_url":"https://api.github.com/users/mrbabbs/following{/other_user}","gists_url":"https://api.github.com/users/mrbabbs/gists{/gist_id}","starred_url":"https://api.github.com/users/mrbabbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrbabbs/subscriptions","organizations_url":"https://api.github.com/users/mrbabbs/orgs","repos_url":"https://api.github.com/users/mrbabbs/repos","events_url":"https://api.github.com/users/mrbabbs/events{/privacy}","received_events_url":"https://api.github.com/users/mrbabbs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrbabbs/devour","description":"Don't just consume your JSON API, Devour it...","fork":true,"url":"https://api.github.com/repos/mrbabbs/devour","forks_url":"https://api.github.com/repos/mrbabbs/devour/forks","keys_url":"https://api.github.com/repos/mrbabbs/devour/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrbabbs/devour/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrbabbs/devour/teams","hooks_url":"https://api.github.com/repos/mrbabbs/devour/hooks","issue_events_url":"https://api.github.com/repos/mrbabbs/devour/issues/events{/number}","events_url":"https://api.github.com/repos/mrbabbs/devour/events","assignees_url":"https://api.github.com/repos/mrbabbs/devour/assignees{/user}","branches_url":"https://api.github.com/repos/mrbabbs/devour/branches{/branch}","tags_url":"https://api.github.com/repos/mrbabbs/devour/tags","blobs_url":"https://api.github.com/repos/mrbabbs/devour/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrbabbs/devour/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrbabbs/devour/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrbabbs/devour/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrbabbs/devour/statuses/{sha}","languages_url":"https://api.github.com/repos/mrbabbs/devour/languages","stargazers_url":"https://api.github.com/repos/mrbabbs/devour/stargazers","contributors_url":"https://api.github.com/repos/mrbabbs/devour/contributors","subscribers_url":"https://api.github.com/repos/mrbabbs/devour/subscribers","subscription_url":"https://api.github.com/repos/mrbabbs/devour/subscription","commits_url":"https://api.github.com/repos/mrbabbs/devour/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrbabbs/devour/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrbabbs/devour/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrbabbs/devour/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrbabbs/devour/contents/{+path}","compare_url":"https://api.github.com/repos/mrbabbs/devour/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrbabbs/devour/merges","archive_url":"https://api.github.com/repos/mrbabbs/devour/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrbabbs/devour/downloads","issues_url":"https://api.github.com/repos/mrbabbs/devour/issues{/number}","pulls_url":"https://api.github.com/repos/mrbabbs/devour/pulls{/number}","milestones_url":"https://api.github.com/repos/mrbabbs/devour/milestones{/number}","notifications_url":"https://api.github.com/repos/mrbabbs/devour/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrbabbs/devour/labels{/name}","releases_url":"https://api.github.com/repos/mrbabbs/devour/releases{/id}","deployments_url":"https://api.github.com/repos/mrbabbs/devour/deployments","created_at":"2016-06-30T12:13:09Z","updated_at":"2016-06-30T12:13:10Z","pushed_at":"2016-07-11T09:40:54Z","git_url":"git://github.com/mrbabbs/devour.git","ssh_url":"git@github.com:mrbabbs/devour.git","clone_url":"https://github.com/mrbabbs/devour.git","svn_url":"https://github.com/mrbabbs/devour","homepage":null,"size":69,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"twg:master","ref":"master","sha":"4c45b2271b6f21767b847b39293a3d1374d24d1b","user":{"login":"twg","id":391284,"avatar_url":"https://avatars.githubusercontent.com/u/391284?v=3","gravatar_id":"","url":"https://api.github.com/users/twg","html_url":"https://github.com/twg","followers_url":"https://api.github.com/users/twg/followers","following_url":"https://api.github.com/users/twg/following{/other_user}","gists_url":"https://api.github.com/users/twg/gists{/gist_id}","starred_url":"https://api.github.com/users/twg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twg/subscriptions","organizations_url":"https://api.github.com/users/twg/orgs","repos_url":"https://api.github.com/users/twg/repos","events_url":"https://api.github.com/users/twg/events{/privacy}","received_events_url":"https://api.github.com/users/twg/received_events","type":"Organization","site_admin":false},"repo":{"id":57391564,"name":"devour","full_name":"twg/devour","owner":{"login":"twg","id":391284,"avatar_url":"https://avatars.githubusercontent.com/u/391284?v=3","gravatar_id":"","url":"https://api.github.com/users/twg","html_url":"https://github.com/twg","followers_url":"https://api.github.com/users/twg/followers","following_url":"https://api.github.com/users/twg/following{/other_user}","gists_url":"https://api.github.com/users/twg/gists{/gist_id}","starred_url":"https://api.github.com/users/twg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twg/subscriptions","organizations_url":"https://api.github.com/users/twg/orgs","repos_url":"https://api.github.com/users/twg/repos","events_url":"https://api.github.com/users/twg/events{/privacy}","received_events_url":"https://api.github.com/users/twg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twg/devour","description":"Don't just consume your JSON API, Devour it...","fork":false,"url":"https://api.github.com/repos/twg/devour","forks_url":"https://api.github.com/repos/twg/devour/forks","keys_url":"https://api.github.com/repos/twg/devour/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twg/devour/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twg/devour/teams","hooks_url":"https://api.github.com/repos/twg/devour/hooks","issue_events_url":"https://api.github.com/repos/twg/devour/issues/events{/number}","events_url":"https://api.github.com/repos/twg/devour/events","assignees_url":"https://api.github.com/repos/twg/devour/assignees{/user}","branches_url":"https://api.github.com/repos/twg/devour/branches{/branch}","tags_url":"https://api.github.com/repos/twg/devour/tags","blobs_url":"https://api.github.com/repos/twg/devour/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twg/devour/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twg/devour/git/refs{/sha}","trees_url":"https://api.github.com/repos/twg/devour/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twg/devour/statuses/{sha}","languages_url":"https://api.github.com/repos/twg/devour/languages","stargazers_url":"https://api.github.com/repos/twg/devour/stargazers","contributors_url":"https://api.github.com/repos/twg/devour/contributors","subscribers_url":"https://api.github.com/repos/twg/devour/subscribers","subscription_url":"https://api.github.com/repos/twg/devour/subscription","commits_url":"https://api.github.com/repos/twg/devour/commits{/sha}","git_commits_url":"https://api.github.com/repos/twg/devour/git/commits{/sha}","comments_url":"https://api.github.com/repos/twg/devour/comments{/number}","issue_comment_url":"https://api.github.com/repos/twg/devour/issues/comments{/number}","contents_url":"https://api.github.com/repos/twg/devour/contents/{+path}","compare_url":"https://api.github.com/repos/twg/devour/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twg/devour/merges","archive_url":"https://api.github.com/repos/twg/devour/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twg/devour/downloads","issues_url":"https://api.github.com/repos/twg/devour/issues{/number}","pulls_url":"https://api.github.com/repos/twg/devour/pulls{/number}","milestones_url":"https://api.github.com/repos/twg/devour/milestones{/number}","notifications_url":"https://api.github.com/repos/twg/devour/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twg/devour/labels{/name}","releases_url":"https://api.github.com/repos/twg/devour/releases{/id}","deployments_url":"https://api.github.com/repos/twg/devour/deployments","created_at":"2016-04-29T14:42:16Z","updated_at":"2016-07-10T04:43:17Z","pushed_at":"2016-07-05T15:54:47Z","git_url":"git://github.com/twg/devour.git","ssh_url":"git@github.com:twg/devour.git","clone_url":"https://github.com/twg/devour.git","svn_url":"https://github.com/twg/devour","homepage":null,"size":67,"stargazers_count":51,"watchers_count":51,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":12,"forks":11,"open_issues":12,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twg/devour/pulls/51"},"html":{"href":"https://github.com/twg/devour/pull/51"},"issue":{"href":"https://api.github.com/repos/twg/devour/issues/51"},"comments":{"href":"https://api.github.com/repos/twg/devour/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/twg/devour/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/twg/devour/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twg/devour/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/twg/devour/statuses/38e6a8143fb4ad276cb6518cc611c3a49f2a6bcc"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":10,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"mrbabbs"}}