{"action":"opened","number":326,"pull_request":{"url":"https://api.github.com/repos/SatelliteQE/nailgun/pulls/326","id":90080434,"html_url":"https://github.com/SatelliteQE/nailgun/pull/326","diff_url":"https://github.com/SatelliteQE/nailgun/pull/326.diff","patch_url":"https://github.com/SatelliteQE/nailgun/pull/326.patch","issue_url":"https://api.github.com/repos/SatelliteQE/nailgun/issues/326","number":326,"state":"open","locked":false,"title":"Added json method to Entity","user":{"login":"renzon","id":3457115,"avatar_url":"https://avatars.githubusercontent.com/u/3457115?v=3","gravatar_id":"","url":"https://api.github.com/users/renzon","html_url":"https://github.com/renzon","followers_url":"https://api.github.com/users/renzon/followers","following_url":"https://api.github.com/users/renzon/following{/other_user}","gists_url":"https://api.github.com/users/renzon/gists{/gist_id}","starred_url":"https://api.github.com/users/renzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renzon/subscriptions","organizations_url":"https://api.github.com/users/renzon/orgs","repos_url":"https://api.github.com/users/renzon/repos","events_url":"https://api.github.com/users/renzon/events{/privacy}","received_events_url":"https://api.github.com/users/renzon/received_events","type":"User","site_admin":false},"body":"close #323\r\n\r\nOnce the methods uses _payload, some Entities maybe need\r\n override this to match names expected on API\r\n\r\nI followed @elyezer tip and made a this POC that worked for simple properties: https://github.com/renzon/nailgun/commit/d092468853d49239fa909ceba1da8af0e3271ba0.\r\n\r\nThe problem is when the default naming mapping is not correct with the expected for API. But in this case Subclasses can override _to_json_dict for the exceptions.\r\n\r\n@ehelms and @rochacbruno could give it a try to check exceptions as they use it and creating issues here for them. What you guys think?","created_at":"2016-10-19T20:04:53Z","updated_at":"2016-10-19T20:04:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SatelliteQE/nailgun/pulls/326/commits","review_comments_url":"https://api.github.com/repos/SatelliteQE/nailgun/pulls/326/comments","review_comment_url":"https://api.github.com/repos/SatelliteQE/nailgun/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SatelliteQE/nailgun/issues/326/comments","statuses_url":"https://api.github.com/repos/SatelliteQE/nailgun/statuses/71c77315a57165ff0d11be160d711f7111107cee","head":{"label":"renzon:323","ref":"323","sha":"71c77315a57165ff0d11be160d711f7111107cee","user":{"login":"renzon","id":3457115,"avatar_url":"https://avatars.githubusercontent.com/u/3457115?v=3","gravatar_id":"","url":"https://api.github.com/users/renzon","html_url":"https://github.com/renzon","followers_url":"https://api.github.com/users/renzon/followers","following_url":"https://api.github.com/users/renzon/following{/other_user}","gists_url":"https://api.github.com/users/renzon/gists{/gist_id}","starred_url":"https://api.github.com/users/renzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renzon/subscriptions","organizations_url":"https://api.github.com/users/renzon/orgs","repos_url":"https://api.github.com/users/renzon/repos","events_url":"https://api.github.com/users/renzon/events{/privacy}","received_events_url":"https://api.github.com/users/renzon/received_events","type":"User","site_admin":false},"repo":{"id":69048929,"name":"nailgun","full_name":"renzon/nailgun","owner":{"login":"renzon","id":3457115,"avatar_url":"https://avatars.githubusercontent.com/u/3457115?v=3","gravatar_id":"","url":"https://api.github.com/users/renzon","html_url":"https://github.com/renzon","followers_url":"https://api.github.com/users/renzon/followers","following_url":"https://api.github.com/users/renzon/following{/other_user}","gists_url":"https://api.github.com/users/renzon/gists{/gist_id}","starred_url":"https://api.github.com/users/renzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renzon/subscriptions","organizations_url":"https://api.github.com/users/renzon/orgs","repos_url":"https://api.github.com/users/renzon/repos","events_url":"https://api.github.com/users/renzon/events{/privacy}","received_events_url":"https://api.github.com/users/renzon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/renzon/nailgun","description":"Why use a hammer when you can use a nailgun.","fork":true,"url":"https://api.github.com/repos/renzon/nailgun","forks_url":"https://api.github.com/repos/renzon/nailgun/forks","keys_url":"https://api.github.com/repos/renzon/nailgun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/renzon/nailgun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/renzon/nailgun/teams","hooks_url":"https://api.github.com/repos/renzon/nailgun/hooks","issue_events_url":"https://api.github.com/repos/renzon/nailgun/issues/events{/number}","events_url":"https://api.github.com/repos/renzon/nailgun/events","assignees_url":"https://api.github.com/repos/renzon/nailgun/assignees{/user}","branches_url":"https://api.github.com/repos/renzon/nailgun/branches{/branch}","tags_url":"https://api.github.com/repos/renzon/nailgun/tags","blobs_url":"https://api.github.com/repos/renzon/nailgun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/renzon/nailgun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/renzon/nailgun/git/refs{/sha}","trees_url":"https://api.github.com/repos/renzon/nailgun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/renzon/nailgun/statuses/{sha}","languages_url":"https://api.github.com/repos/renzon/nailgun/languages","stargazers_url":"https://api.github.com/repos/renzon/nailgun/stargazers","contributors_url":"https://api.github.com/repos/renzon/nailgun/contributors","subscribers_url":"https://api.github.com/repos/renzon/nailgun/subscribers","subscription_url":"https://api.github.com/repos/renzon/nailgun/subscription","commits_url":"https://api.github.com/repos/renzon/nailgun/commits{/sha}","git_commits_url":"https://api.github.com/repos/renzon/nailgun/git/commits{/sha}","comments_url":"https://api.github.com/repos/renzon/nailgun/comments{/number}","issue_comment_url":"https://api.github.com/repos/renzon/nailgun/issues/comments{/number}","contents_url":"https://api.github.com/repos/renzon/nailgun/contents/{+path}","compare_url":"https://api.github.com/repos/renzon/nailgun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/renzon/nailgun/merges","archive_url":"https://api.github.com/repos/renzon/nailgun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/renzon/nailgun/downloads","issues_url":"https://api.github.com/repos/renzon/nailgun/issues{/number}","pulls_url":"https://api.github.com/repos/renzon/nailgun/pulls{/number}","milestones_url":"https://api.github.com/repos/renzon/nailgun/milestones{/number}","notifications_url":"https://api.github.com/repos/renzon/nailgun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/renzon/nailgun/labels{/name}","releases_url":"https://api.github.com/repos/renzon/nailgun/releases{/id}","deployments_url":"https://api.github.com/repos/renzon/nailgun/deployments","created_at":"2016-09-23T18:03:56Z","updated_at":"2016-09-23T18:03:57Z","pushed_at":"2016-10-19T20:01:02Z","git_url":"git://github.com/renzon/nailgun.git","ssh_url":"git@github.com:renzon/nailgun.git","clone_url":"https://github.com/renzon/nailgun.git","svn_url":"https://github.com/renzon/nailgun","homepage":null,"size":1548,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"SatelliteQE:master","ref":"master","sha":"40ee56fd2797202ad5cb56dd9c5ea98508b6ac38","user":{"login":"SatelliteQE","id":8754276,"avatar_url":"https://avatars.githubusercontent.com/u/8754276?v=3","gravatar_id":"","url":"https://api.github.com/users/SatelliteQE","html_url":"https://github.com/SatelliteQE","followers_url":"https://api.github.com/users/SatelliteQE/followers","following_url":"https://api.github.com/users/SatelliteQE/following{/other_user}","gists_url":"https://api.github.com/users/SatelliteQE/gists{/gist_id}","starred_url":"https://api.github.com/users/SatelliteQE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SatelliteQE/subscriptions","organizations_url":"https://api.github.com/users/SatelliteQE/orgs","repos_url":"https://api.github.com/users/SatelliteQE/repos","events_url":"https://api.github.com/users/SatelliteQE/events{/privacy}","received_events_url":"https://api.github.com/users/SatelliteQE/received_events","type":"Organization","site_admin":false},"repo":{"id":27888295,"name":"nailgun","full_name":"SatelliteQE/nailgun","owner":{"login":"SatelliteQE","id":8754276,"avatar_url":"https://avatars.githubusercontent.com/u/8754276?v=3","gravatar_id":"","url":"https://api.github.com/users/SatelliteQE","html_url":"https://github.com/SatelliteQE","followers_url":"https://api.github.com/users/SatelliteQE/followers","following_url":"https://api.github.com/users/SatelliteQE/following{/other_user}","gists_url":"https://api.github.com/users/SatelliteQE/gists{/gist_id}","starred_url":"https://api.github.com/users/SatelliteQE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SatelliteQE/subscriptions","organizations_url":"https://api.github.com/users/SatelliteQE/orgs","repos_url":"https://api.github.com/users/SatelliteQE/repos","events_url":"https://api.github.com/users/SatelliteQE/events{/privacy}","received_events_url":"https://api.github.com/users/SatelliteQE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SatelliteQE/nailgun","description":"Why use a hammer when you can use a nailgun.","fork":false,"url":"https://api.github.com/repos/SatelliteQE/nailgun","forks_url":"https://api.github.com/repos/SatelliteQE/nailgun/forks","keys_url":"https://api.github.com/repos/SatelliteQE/nailgun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SatelliteQE/nailgun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SatelliteQE/nailgun/teams","hooks_url":"https://api.github.com/repos/SatelliteQE/nailgun/hooks","issue_events_url":"https://api.github.com/repos/SatelliteQE/nailgun/issues/events{/number}","events_url":"https://api.github.com/repos/SatelliteQE/nailgun/events","assignees_url":"https://api.github.com/repos/SatelliteQE/nailgun/assignees{/user}","branches_url":"https://api.github.com/repos/SatelliteQE/nailgun/branches{/branch}","tags_url":"https://api.github.com/repos/SatelliteQE/nailgun/tags","blobs_url":"https://api.github.com/repos/SatelliteQE/nailgun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SatelliteQE/nailgun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SatelliteQE/nailgun/git/refs{/sha}","trees_url":"https://api.github.com/repos/SatelliteQE/nailgun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SatelliteQE/nailgun/statuses/{sha}","languages_url":"https://api.github.com/repos/SatelliteQE/nailgun/languages","stargazers_url":"https://api.github.com/repos/SatelliteQE/nailgun/stargazers","contributors_url":"https://api.github.com/repos/SatelliteQE/nailgun/contributors","subscribers_url":"https://api.github.com/repos/SatelliteQE/nailgun/subscribers","subscription_url":"https://api.github.com/repos/SatelliteQE/nailgun/subscription","commits_url":"https://api.github.com/repos/SatelliteQE/nailgun/commits{/sha}","git_commits_url":"https://api.github.com/repos/SatelliteQE/nailgun/git/commits{/sha}","comments_url":"https://api.github.com/repos/SatelliteQE/nailgun/comments{/number}","issue_comment_url":"https://api.github.com/repos/SatelliteQE/nailgun/issues/comments{/number}","contents_url":"https://api.github.com/repos/SatelliteQE/nailgun/contents/{+path}","compare_url":"https://api.github.com/repos/SatelliteQE/nailgun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SatelliteQE/nailgun/merges","archive_url":"https://api.github.com/repos/SatelliteQE/nailgun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SatelliteQE/nailgun/downloads","issues_url":"https://api.github.com/repos/SatelliteQE/nailgun/issues{/number}","pulls_url":"https://api.github.com/repos/SatelliteQE/nailgun/pulls{/number}","milestones_url":"https://api.github.com/repos/SatelliteQE/nailgun/milestones{/number}","notifications_url":"https://api.github.com/repos/SatelliteQE/nailgun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SatelliteQE/nailgun/labels{/name}","releases_url":"https://api.github.com/repos/SatelliteQE/nailgun/releases{/id}","deployments_url":"https://api.github.com/repos/SatelliteQE/nailgun/deployments","created_at":"2014-12-11T19:39:59Z","updated_at":"2016-10-19T16:44:25Z","pushed_at":"2016-10-19T20:04:53Z","git_url":"git://github.com/SatelliteQE/nailgun.git","ssh_url":"git@github.com:SatelliteQE/nailgun.git","clone_url":"https://github.com/SatelliteQE/nailgun.git","svn_url":"https://github.com/SatelliteQE/nailgun","homepage":null,"size":1695,"stargazers_count":21,"watchers_count":21,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":31,"forks":22,"open_issues":31,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/nailgun/pulls/326"},"html":{"href":"https://github.com/SatelliteQE/nailgun/pull/326"},"issue":{"href":"https://api.github.com/repos/SatelliteQE/nailgun/issues/326"},"comments":{"href":"https://api.github.com/repos/SatelliteQE/nailgun/issues/326/comments"},"review_comments":{"href":"https://api.github.com/repos/SatelliteQE/nailgun/pulls/326/comments"},"review_comment":{"href":"https://api.github.com/repos/SatelliteQE/nailgun/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SatelliteQE/nailgun/pulls/326/commits"},"statuses":{"href":"https://api.github.com/repos/SatelliteQE/nailgun/statuses/71c77315a57165ff0d11be160d711f7111107cee"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":41,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"renzon"}}