diff --git a/src/simple_github/client.py b/src/simple_github/client.py index 7d45a2f..cd76a81 100644 --- a/src/simple_github/client.py +++ b/src/simple_github/client.py @@ -79,7 +79,7 @@ async def _get_aiohttp_session(self) -> ClientSession: assert session.transport.session return session.transport.session - async def _make_request(self, method: str, query: str, **kwargs) -> Response: + async def request(self, method: str, query: str, **kwargs) -> Response: """Make a request to Github's REST API. Args: @@ -111,7 +111,7 @@ async def get(self, query: str) -> Response: Returns: Dict: The JSON result of the request. """ - return await self._make_request("GET", query) + return await self.request("GET", query) async def post(self, query: str, data: Optional[Dict] = None) -> Response: """Make a POST request to Github's REST API. @@ -123,7 +123,7 @@ async def post(self, query: str, data: Optional[Dict] = None) -> Response: Returns: Dict: The JSON result of the request. """ - return await self._make_request("POST", query, data=json.dumps(data)) + return await self.request("POST", query, data=json.dumps(data)) async def execute(self, query: str, variables: Optional[Dict] = None) -> Dict: """Execute a query against Github's GraphQL endpoint.