diff --git a/api/apps/installactions.py b/api/apps/installactions.py index a039858..cf619e0 100644 --- a/api/apps/installactions.py +++ b/api/apps/installactions.py @@ -25,5 +25,12 @@ def add_repository_to_installation(self, installation_id, repository_id, **kwarg https://developer.github.com/v3/apps/installations/#add-repository-to-installation """ headers = {'Accept': 'application/vnd.github.machine-man-preview+json'} - return self.put("/user/installations/{}/repositories/{}".format(installation_id, repository_id), headers = headers, **kwargs) + return self.put("/user/installations/{}/repositories/{}".format(installation_id, repository_id), + headers=headers, **kwargs) + def create_a_content_attavhment(self, content_reference_id, **kwargs): + """ + https://developer.github.com/v3/apps/installations/#create-a-content-attachment + """ + headers = {'Accept': 'application/vnd.github.corsair-preview+json'} + return self.post("/content_references/{}/attachments".format(content_reference_id, headers=headers,**kwargs)) diff --git a/api/git/__init__.py b/api/git/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/api/git/tags.py b/api/git/tags.py new file mode 100644 index 0000000..e7e1885 --- /dev/null +++ b/api/git/tags.py @@ -0,0 +1,10 @@ +from core.rest_client import RestClient + + +class Tags(RestClient): + + def create_a_tag_object(self, owner, repo, **kwargs): + """ + https://developer.github.com/v3/git/tags/#create-a-tag-object + """ + return self.post("/repos/{}/{}/git/tags".format(owner, repo), **kwargs) diff --git a/api/reactions/reactions.py b/api/reactions/reactions.py index d18402c..33e6bc4 100644 --- a/api/reactions/reactions.py +++ b/api/reactions/reactions.py @@ -7,4 +7,5 @@ def list_reactions_for_a_commit_comment(self, owner, repo, comment_id, **kwargs) """ https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment """ - return self.get("/repos/{}/{}/comments/{}/reactions".format(owner, repo, comment_id), **kwargs) + headers = {'Accept': "application/vnd.github.squirrel-girl-preview+json"} + return self.get("/repos/{}/{}/comments/{}/reactions".format(owner, repo, comment_id), headers=headers, **kwargs)