@@ -547,6 +547,15 @@ def requestJsonAndCheck(
547547 headers : Optional [Dict [str , str ]] = None ,
548548 input : Optional [Any ] = None ,
549549 ) -> Tuple [Dict [str , Any ], Any ]:
550+ """
551+ Send a request with JSON body.
552+
553+ :param input: request body, serialized to JSON if specified
554+
555+ :return: ``(headers: dict, JSON Response: Any)``
556+ :raises: :class:`GithubException` for error status codes
557+
558+ """
550559 return self .__check (* self .requestJson (verb , url , parameters , headers , input , self .__customConnection (url )))
551560
552561 def requestMultipartAndCheck (
@@ -557,6 +566,15 @@ def requestMultipartAndCheck(
557566 headers : Optional [Dict [str , Any ]] = None ,
558567 input : Optional [Dict [str , str ]] = None ,
559568 ) -> Tuple [Dict [str , Any ], Optional [Dict [str , Any ]]]:
569+ """
570+ Send a request with multi-part-encoded body.
571+
572+ :param input: request body, will be multi-part encoded if specified
573+
574+ :return: ``(headers: dict, JSON Response: Any)``
575+ :raises: :class:`GithubException` for error status codes
576+
577+ """
560578 return self .__check (* self .requestMultipart (verb , url , parameters , headers , input , self .__customConnection (url )))
561579
562580 def requestBlobAndCheck (
@@ -568,6 +586,15 @@ def requestBlobAndCheck(
568586 input : Optional [str ] = None ,
569587 cnx : Optional [Union [HTTPRequestsConnectionClass , HTTPSRequestsConnectionClass ]] = None ,
570588 ) -> Tuple [Dict [str , Any ], Dict [str , Any ]]:
589+ """
590+ Send a request with a file for the body.
591+
592+ :param input: path to a file to use for the request body
593+
594+ :return: ``(headers: dict, JSON Response: Any)``
595+ :raises: :class:`GithubException` for error status codes
596+
597+ """
571598 return self .__check (* self .requestBlob (verb , url , parameters , headers , input , self .__customConnection (url )))
572599
573600 def graphql_query (self , query : str , variables : Dict [str , Any ]) -> Tuple [Dict [str , Any ], Dict [str , Any ]]:
@@ -709,6 +736,14 @@ def requestJson(
709736 input : Optional [Any ] = None ,
710737 cnx : Optional [Union [HTTPRequestsConnectionClass , HTTPSRequestsConnectionClass ]] = None ,
711738 ) -> Tuple [int , Dict [str , Any ], str ]:
739+ """
740+ Send a request with JSON input.
741+
742+ :param input: request body, will be serialized as JSON
743+ :returns:``(status, headers, body)``
744+
745+ """
746+
712747 def encode (input : Any ) -> Tuple [str , str ]:
713748 return "application/json" , json .dumps (input )
714749
@@ -723,6 +758,14 @@ def requestMultipart(
723758 input : Optional [Dict [str , str ]] = None ,
724759 cnx : Optional [Union [HTTPRequestsConnectionClass , HTTPSRequestsConnectionClass ]] = None ,
725760 ) -> Tuple [int , Dict [str , Any ], str ]:
761+ """
762+ Send a request with multi-part encoding.
763+
764+ :param input: request body, will be serialized as multipart form data
765+ :returns:``(status, headers, body)``
766+
767+ """
768+
726769 def encode (input : Dict [str , Any ]) -> Tuple [str , str ]:
727770 boundary = "----------------------------3c3ba8b523b2"
728771 eol = "\r \n "
@@ -747,6 +790,13 @@ def requestBlob(
747790 input : Optional [str ] = None ,
748791 cnx : Optional [Union [HTTPRequestsConnectionClass , HTTPSRequestsConnectionClass ]] = None ,
749792 ) -> Tuple [int , Dict [str , Any ], str ]:
793+ """
794+ Send a request with a file as request body.
795+
796+ :param input: path to a local file to use for request body
797+ :returns:``(status, headers, body)``
798+
799+ """
750800 if headers is None :
751801 headers = {}
752802
@@ -772,6 +822,15 @@ def requestMemoryBlobAndCheck(
772822 file_like : BinaryIO ,
773823 cnx : Optional [Union [HTTPRequestsConnectionClass , HTTPSRequestsConnectionClass ]] = None ,
774824 ) -> Tuple [Dict [str , Any ], Any ]:
825+ """
826+ Send a request with a binary file-like for the body.
827+
828+ :param file_like: file-like object to use for the request body
829+ :return: ``(headers: dict, JSON Response: Any)``
830+ :raises: :class:`GithubException` for error status codes
831+
832+ """
833+
775834 # The expected signature of encode means that the argument is ignored.
776835 def encode (_ : Any ) -> Tuple [str , Any ]:
777836 return headers ["Content-Type" ], file_like
0 commit comments