mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-14 21:24:59 +00:00
Add gist comment routes
This commit is contained in:
parent
73c1153b8d
commit
8637e408f5
1 changed files with 25 additions and 1 deletions
|
@ -66,7 +66,7 @@ class RateLimits(NamedTuple):
|
|||
# Deployments
|
||||
# Emojis DONE
|
||||
# Enterprise administration
|
||||
# Gists DONE(1st part)
|
||||
# Gists DONE
|
||||
# Git database
|
||||
# Gitignore DONE
|
||||
# Interactions
|
||||
|
@ -855,6 +855,30 @@ class HTTPClient:
|
|||
|
||||
return await self.request("GET", f"/users/{username}/gists", params=params)
|
||||
|
||||
async def list_gist_comments(
|
||||
self, *, gist_id: str, per_page: Optional[int] = None, page: Optional[int] = None
|
||||
):
|
||||
params = {}
|
||||
|
||||
if per_page:
|
||||
params["per_page"] = per_page
|
||||
if page:
|
||||
params["page"] = page
|
||||
|
||||
return await self.request("GET", f"/gists/{gist_id}/comments", params=params)
|
||||
|
||||
async def create_gist_comment(self, *, gist_id: str, body: str):
|
||||
return await self.request("POST", f"/gists/{gist_id}/comments", json={"body": body})
|
||||
|
||||
async def get_gist_comment(self, *, gist_id: str, comment_id: str):
|
||||
return await self.request("GET", f"/gists/{gist_id}/comments/{comment_id}")
|
||||
|
||||
async def update_gist_comment(self, *, gist_id: str, comment_id: str, body: str):
|
||||
return await self.request("PATCH", f"/gists/{gist_id}/comments/{comment_id}", json={"body": body})
|
||||
|
||||
async def delete_gist_comment(self, *, gist_id: str, comment_id: str):
|
||||
return await self.request("DELETE", f"/gists/{gist_id}/comments/{comment_id}")
|
||||
|
||||
# === LICENSES === #
|
||||
|
||||
async def get_all_commonly_used_licenses(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue