We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b78586f commit 7d4c888Copy full SHA for 7d4c888
1 file changed
src/github3/apps.py
@@ -80,6 +80,10 @@ class App(models.GitHubCore):
80
https://developer.github.com/v3/apps/
81
"""
82
83
+ CUSTOM_HEADERS = {
84
+ "Accept": "application/vnd.github.machine-man-preview+json"
85
+ }
86
+
87
def _update_attributes(self, json):
88
self.created_at = self._strptime(json["created_at"])
89
self.description = json["description"]
@@ -90,6 +94,8 @@ def _update_attributes(self, json):
90
94
self.node_id = json["node_id"]
91
95
self.owner = users.ShortUser(json["owner"], self)
92
96
self.updated_at = self._strptime(json["updated_at"])
97
+ _, slug = json["html_url"].rsplit("/", 1)
98
+ self._api = self.url = self._build_url("apps", slug)
93
99
100
def _repr(self):
101
return '<App ["{}" by {}]>'.format(self.name, str(self.owner))
0 commit comments