Skip to content

Commit 7d4c888

Browse files
committed
Make App refreshable similar to CheckApp
1 parent b78586f commit 7d4c888

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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)