{"action":"created","comment":{"url":"https://api.github.com/repos/octokit/octokit.py/pulls/comments/44586367","id":44586367,"diff_hunk":"@@ -226,7 +196,5 @@ def fetch_resource(self, method, *args, **kwargs):\n     response = self.session.send(prepared_req)\n \n     schema = self.parse_schema(response)\n-    self.rels = self.parse_rels(response)\n-    self.session.last_response = response\n \n-    return Resource(self.session, schema=schema, name=humanize(self.name))\n+    return Resource(self.session, response=response, schema=schema, name=humanize(self.name))","path":"octokit/resources.py","position":101,"original_position":101,"commit_id":"01557af867485633e38e8750e380b99ec14e7288","original_commit_id":"01557af867485633e38e8750e380b99ec14e7288","user":{"login":"howeik","id":755891,"avatar_url":"https://avatars.githubusercontent.com/u/755891?v=3","gravatar_id":"","url":"https://api.github.com/users/howeik","html_url":"https://github.com/howeik","followers_url":"https://api.github.com/users/howeik/followers","following_url":"https://api.github.com/users/howeik/following{/other_user}","gists_url":"https://api.github.com/users/howeik/gists{/gist_id}","starred_url":"https://api.github.com/users/howeik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howeik/subscriptions","organizations_url":"https://api.github.com/users/howeik/orgs","repos_url":"https://api.github.com/users/howeik/repos","events_url":"https://api.github.com/users/howeik/events{/privacy}","received_events_url":"https://api.github.com/users/howeik/received_events","type":"User","site_admin":false},"body":"Yep me too. I tried to do this though and I ended up in an endless recursion in `__getattr__`. I saw you passed response in your branch though so maybe you know how we could deal with that!","created_at":"2015-11-11T21:08:16Z","updated_at":"2015-11-11T21:08:16Z","html_url":"https://github.com/octokit/octokit.py/pull/19#discussion_r44586367","pull_request_url":"https://api.github.com/repos/octokit/octokit.py/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/octokit/octokit.py/pulls/comments/44586367"},"html":{"href":"https://github.com/octokit/octokit.py/pull/19#discussion_r44586367"},"pull_request":{"href":"https://api.github.com/repos/octokit/octokit.py/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/octokit/octokit.py/pulls/19","id":50370061,"html_url":"https://github.com/octokit/octokit.py/pull/19","diff_url":"https://github.com/octokit/octokit.py/pull/19.diff","patch_url":"https://github.com/octokit/octokit.py/pull/19.patch","issue_url":"https://api.github.com/repos/octokit/octokit.py/issues/19","number":19,"state":"open","locked":false,"title":"Alternative library restructure","user":{"login":"howeik","id":755891,"avatar_url":"https://avatars.githubusercontent.com/u/755891?v=3","gravatar_id":"","url":"https://api.github.com/users/howeik","html_url":"https://github.com/howeik","followers_url":"https://api.github.com/users/howeik/followers","following_url":"https://api.github.com/users/howeik/following{/other_user}","gists_url":"https://api.github.com/users/howeik/gists{/gist_id}","starred_url":"https://api.github.com/users/howeik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howeik/subscriptions","organizations_url":"https://api.github.com/users/howeik/orgs","repos_url":"https://api.github.com/users/howeik/repos","events_url":"https://api.github.com/users/howeik/events{/privacy}","received_events_url":"https://api.github.com/users/howeik/received_events","type":"User","site_admin":false},"body":"My alternative to https://github.com/octokit/octokit.py/pull/18 to address https://github.com/octokit/octokit.py/issues/17\r\n\r\nHighlights\r\n- Resource remains the hypermedia agent.\r\n- Client is a hypermedia agent (subclass of Resource) that additionally contains octokit specific fields, functionality, and mixins. This allows Client to act as a specialized hypermedia agent.\r\n- Because of the above, octokit specific code can now be decoupled from Resource and coupled with Client instead.\r\n- Moved Client functionality to BaseClient, making Client just a mixin of BaseClient, RateLimit, and future mixin classes. This allows each mixin to have its constructor called so we don't have to initialize mixin fields lazily or in Client's constructor.\r\n- We're able to paginate all requests automatically (hypermedia, or through a convenience class)\r\n- We're able to handle octokit specific exceptions independently of Resource\r\n\r\n/cc @octokit/ucsd-octokit-py ","created_at":"2015-11-11T10:48:26Z","updated_at":"2015-11-11T21:08:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"328c26177db940adf19b2e3e30ef1c20d46e6f44","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/octokit/octokit.py/pulls/19/commits","review_comments_url":"https://api.github.com/repos/octokit/octokit.py/pulls/19/comments","review_comment_url":"https://api.github.com/repos/octokit/octokit.py/pulls/comments{/number}","comments_url":"https://api.github.com/repos/octokit/octokit.py/issues/19/comments","statuses_url":"https://api.github.com/repos/octokit/octokit.py/statuses/01557af867485633e38e8750e380b99ec14e7288","head":{"label":"octokit:howei-redesign-structure","ref":"howei-redesign-structure","sha":"01557af867485633e38e8750e380b99ec14e7288","user":{"login":"octokit","id":3430433,"avatar_url":"https://avatars.githubusercontent.com/u/3430433?v=3","gravatar_id":"","url":"https://api.github.com/users/octokit","html_url":"https://github.com/octokit","followers_url":"https://api.github.com/users/octokit/followers","following_url":"https://api.github.com/users/octokit/following{/other_user}","gists_url":"https://api.github.com/users/octokit/gists{/gist_id}","starred_url":"https://api.github.com/users/octokit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octokit/subscriptions","organizations_url":"https://api.github.com/users/octokit/orgs","repos_url":"https://api.github.com/users/octokit/repos","events_url":"https://api.github.com/users/octokit/events{/privacy}","received_events_url":"https://api.github.com/users/octokit/received_events","type":"Organization","site_admin":false},"repo":{"id":12656877,"name":"octokit.py","full_name":"octokit/octokit.py","owner":{"login":"octokit","id":3430433,"avatar_url":"https://avatars.githubusercontent.com/u/3430433?v=3","gravatar_id":"","url":"https://api.github.com/users/octokit","html_url":"https://github.com/octokit","followers_url":"https://api.github.com/users/octokit/followers","following_url":"https://api.github.com/users/octokit/following{/other_user}","gists_url":"https://api.github.com/users/octokit/gists{/gist_id}","starred_url":"https://api.github.com/users/octokit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octokit/subscriptions","organizations_url":"https://api.github.com/users/octokit/orgs","repos_url":"https://api.github.com/users/octokit/repos","events_url":"https://api.github.com/users/octokit/events{/privacy}","received_events_url":"https://api.github.com/users/octokit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/octokit/octokit.py","description":"GitHub API client for Python","fork":false,"url":"https://api.github.com/repos/octokit/octokit.py","forks_url":"https://api.github.com/repos/octokit/octokit.py/forks","keys_url":"https://api.github.com/repos/octokit/octokit.py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/octokit/octokit.py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/octokit/octokit.py/teams","hooks_url":"https://api.github.com/repos/octokit/octokit.py/hooks","issue_events_url":"https://api.github.com/repos/octokit/octokit.py/issues/events{/number}","events_url":"https://api.github.com/repos/octokit/octokit.py/events","assignees_url":"https://api.github.com/repos/octokit/octokit.py/assignees{/user}","branches_url":"https://api.github.com/repos/octokit/octokit.py/branches{/branch}","tags_url":"https://api.github.com/repos/octokit/octokit.py/tags","blobs_url":"https://api.github.com/repos/octokit/octokit.py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/octokit/octokit.py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/octokit/octokit.py/git/refs{/sha}","trees_url":"https://api.github.com/repos/octokit/octokit.py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/octokit/octokit.py/statuses/{sha}","languages_url":"https://api.github.com/repos/octokit/octokit.py/languages","stargazers_url":"https://api.github.com/repos/octokit/octokit.py/stargazers","contributors_url":"https://api.github.com/repos/octokit/octokit.py/contributors","subscribers_url":"https://api.github.com/repos/octokit/octokit.py/subscribers","subscription_url":"https://api.github.com/repos/octokit/octokit.py/subscription","commits_url":"https://api.github.com/repos/octokit/octokit.py/commits{/sha}","git_commits_url":"https://api.github.com/repos/octokit/octokit.py/git/commits{/sha}","comments_url":"https://api.github.com/repos/octokit/octokit.py/comments{/number}","issue_comment_url":"https://api.github.com/repos/octokit/octokit.py/issues/comments{/number}","contents_url":"https://api.github.com/repos/octokit/octokit.py/contents/{+path}","compare_url":"https://api.github.com/repos/octokit/octokit.py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/octokit/octokit.py/merges","archive_url":"https://api.github.com/repos/octokit/octokit.py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/octokit/octokit.py/downloads","issues_url":"https://api.github.com/repos/octokit/octokit.py/issues{/number}","pulls_url":"https://api.github.com/repos/octokit/octokit.py/pulls{/number}","milestones_url":"https://api.github.com/repos/octokit/octokit.py/milestones{/number}","notifications_url":"https://api.github.com/repos/octokit/octokit.py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/octokit/octokit.py/labels{/name}","releases_url":"https://api.github.com/repos/octokit/octokit.py/releases{/id}","created_at":"2013-09-06T23:40:55Z","updated_at":"2015-11-11T11:07:36Z","pushed_at":"2015-11-11T19:27:05Z","git_url":"git://github.com/octokit/octokit.py.git","ssh_url":"git@github.com:octokit/octokit.py.git","clone_url":"https://github.com/octokit/octokit.py.git","svn_url":"https://github.com/octokit/octokit.py","homepage":null,"size":354,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":5,"default_branch":"master"}},"base":{"label":"octokit:master","ref":"master","sha":"556b22db4b0faa2a28f58eaffed11bdfe119ab11","user":{"login":"octokit","id":3430433,"avatar_url":"https://avatars.githubusercontent.com/u/3430433?v=3","gravatar_id":"","url":"https://api.github.com/users/octokit","html_url":"https://github.com/octokit","followers_url":"https://api.github.com/users/octokit/followers","following_url":"https://api.github.com/users/octokit/following{/other_user}","gists_url":"https://api.github.com/users/octokit/gists{/gist_id}","starred_url":"https://api.github.com/users/octokit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octokit/subscriptions","organizations_url":"https://api.github.com/users/octokit/orgs","repos_url":"https://api.github.com/users/octokit/repos","events_url":"https://api.github.com/users/octokit/events{/privacy}","received_events_url":"https://api.github.com/users/octokit/received_events","type":"Organization","site_admin":false},"repo":{"id":12656877,"name":"octokit.py","full_name":"octokit/octokit.py","owner":{"login":"octokit","id":3430433,"avatar_url":"https://avatars.githubusercontent.com/u/3430433?v=3","gravatar_id":"","url":"https://api.github.com/users/octokit","html_url":"https://github.com/octokit","followers_url":"https://api.github.com/users/octokit/followers","following_url":"https://api.github.com/users/octokit/following{/other_user}","gists_url":"https://api.github.com/users/octokit/gists{/gist_id}","starred_url":"https://api.github.com/users/octokit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octokit/subscriptions","organizations_url":"https://api.github.com/users/octokit/orgs","repos_url":"https://api.github.com/users/octokit/repos","events_url":"https://api.github.com/users/octokit/events{/privacy}","received_events_url":"https://api.github.com/users/octokit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/octokit/octokit.py","description":"GitHub API client for Python","fork":false,"url":"https://api.github.com/repos/octokit/octokit.py","forks_url":"https://api.github.com/repos/octokit/octokit.py/forks","keys_url":"https://api.github.com/repos/octokit/octokit.py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/octokit/octokit.py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/octokit/octokit.py/teams","hooks_url":"https://api.github.com/repos/octokit/octokit.py/hooks","issue_events_url":"https://api.github.com/repos/octokit/octokit.py/issues/events{/number}","events_url":"https://api.github.com/repos/octokit/octokit.py/events","assignees_url":"https://api.github.com/repos/octokit/octokit.py/assignees{/user}","branches_url":"https://api.github.com/repos/octokit/octokit.py/branches{/branch}","tags_url":"https://api.github.com/repos/octokit/octokit.py/tags","blobs_url":"https://api.github.com/repos/octokit/octokit.py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/octokit/octokit.py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/octokit/octokit.py/git/refs{/sha}","trees_url":"https://api.github.com/repos/octokit/octokit.py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/octokit/octokit.py/statuses/{sha}","languages_url":"https://api.github.com/repos/octokit/octokit.py/languages","stargazers_url":"https://api.github.com/repos/octokit/octokit.py/stargazers","contributors_url":"https://api.github.com/repos/octokit/octokit.py/contributors","subscribers_url":"https://api.github.com/repos/octokit/octokit.py/subscribers","subscription_url":"https://api.github.com/repos/octokit/octokit.py/subscription","commits_url":"https://api.github.com/repos/octokit/octokit.py/commits{/sha}","git_commits_url":"https://api.github.com/repos/octokit/octokit.py/git/commits{/sha}","comments_url":"https://api.github.com/repos/octokit/octokit.py/comments{/number}","issue_comment_url":"https://api.github.com/repos/octokit/octokit.py/issues/comments{/number}","contents_url":"https://api.github.com/repos/octokit/octokit.py/contents/{+path}","compare_url":"https://api.github.com/repos/octokit/octokit.py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/octokit/octokit.py/merges","archive_url":"https://api.github.com/repos/octokit/octokit.py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/octokit/octokit.py/downloads","issues_url":"https://api.github.com/repos/octokit/octokit.py/issues{/number}","pulls_url":"https://api.github.com/repos/octokit/octokit.py/pulls{/number}","milestones_url":"https://api.github.com/repos/octokit/octokit.py/milestones{/number}","notifications_url":"https://api.github.com/repos/octokit/octokit.py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/octokit/octokit.py/labels{/name}","releases_url":"https://api.github.com/repos/octokit/octokit.py/releases{/id}","created_at":"2013-09-06T23:40:55Z","updated_at":"2015-11-11T11:07:36Z","pushed_at":"2015-11-11T19:27:05Z","git_url":"git://github.com/octokit/octokit.py.git","ssh_url":"git@github.com:octokit/octokit.py.git","clone_url":"https://github.com/octokit/octokit.py.git","svn_url":"https://github.com/octokit/octokit.py","homepage":null,"size":354,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/octokit/octokit.py/pulls/19"},"html":{"href":"https://github.com/octokit/octokit.py/pull/19"},"issue":{"href":"https://api.github.com/repos/octokit/octokit.py/issues/19"},"comments":{"href":"https://api.github.com/repos/octokit/octokit.py/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/octokit/octokit.py/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/octokit/octokit.py/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/octokit/octokit.py/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/octokit/octokit.py/statuses/01557af867485633e38e8750e380b99ec14e7288"}}}}