From 464c830ebc3b65fbd7d45a1b020e742a0056b80e Mon Sep 17 00:00:00 2001 From: RGBCube <78925721+RGBCube@users.noreply.github.com> Date: Mon, 27 Jun 2022 13:33:20 +0300 Subject: [PATCH] Add codes of conduct routes --- github/internals/http.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/github/internals/http.py b/github/internals/http.py index 05772e4..c24c4a1 100644 --- a/github/internals/http.py +++ b/github/internals/http.py @@ -48,7 +48,7 @@ class RateLimits(NamedTuple): # Billing # Branches # Checks -# Codes of conduct +# Codes of conduct DONE # Code Scanning # Codespaces # Collaborators @@ -855,3 +855,11 @@ class HTTPClient: async def get_emojis(self) -> Dict[str, str]: return await self.request("GET", "/emojis") + + # === CODES OF CONDUCT === # + + async def get_all_codes_of_conduct(self): + return await self.request("GET", "/codes_of_conduct") + + async def get_code_of_conduct(self, *, key: str): + return await self.request("GET", f"/codes_of_conduct/{key}") \ No newline at end of file