Skip to content

Commit 080e815

Browse files
authored
Merge branch 'master' into default-read-timeout
2 parents c2bdf55 + 08fde31 commit 080e815

37 files changed

+1852
-71
lines changed

AUTHORS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,5 @@ Contributors
176176
- Andreas Burger (@AndreasBurger)
177177

178178
- James E. Blair (@jeblair)
179+
180+
- Simon Westphahl (@westphahl)

src/github3/apps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ class App(models.GitHubCore):
8080
https://developer.github.com/v3/apps/
8181
"""
8282

83+
CUSTOM_HEADERS = {
84+
"Accept": "application/vnd.github.machine-man-preview+json"
85+
}
86+
8387
def _update_attributes(self, json):
8488
self.created_at = self._strptime(json["created_at"])
8589
self.description = json["description"]
@@ -90,6 +94,8 @@ def _update_attributes(self, json):
9094
self.node_id = json["node_id"]
9195
self.owner = users.ShortUser(json["owner"], self)
9296
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)
9399

94100
def _repr(self):
95101
return '<App ["{}" by {}]>'.format(self.name, str(self.owner))

0 commit comments

Comments
 (0)