Refactor common header constants and custom media type

This commit is contained in:
Wan Liuyang
2018-08-21 15:01:23 +08:00
parent ebcd3a52e3
commit ae5cdb285e
12 changed files with 82 additions and 30 deletions
+3 -2
View File
@@ -25,9 +25,10 @@
################################################################################
import github.GithubObject
import github.NamedUser
import Consts
class Reaction(github.GithubObject.CompletableGithubObject):
"""
@@ -77,7 +78,7 @@ class Reaction(github.GithubObject.CompletableGithubObject):
self._requester.requestJsonAndCheck(
"DELETE",
self._parentUrl("") + "/reactions/" + str(self.id),
headers={'Accept': 'application/vnd.github.squirrel-girl-preview'}
headers={'Accept': Consts.mediaTypeReactionsPreview}
)
def _initAttributes(self):