def queryGitHub(self, gitquery, gitvars={}, verbosity=<NUM_LIT:0>, paginate=False, cursorVar=None, keysToList=[], rest=False, requestCount=<NUM_LIT:0>, pageNum=<NUM_LIT:0>):
requestCount += <NUM_LIT:1><EOL>if pageNum < <NUM_LIT:0>:  <EOL><INDENT>pageNum = <NUM_LIT:0><EOL><DEDENT>pageNum += <NUM_LIT:1><EOL>if paginate:<EOL><INDENT>_vPrint((verbosity >= <NUM_LIT:0>), "<STR_LIT>" % (pageNum))<EOL><DEDENT>_vPrint((verbosity >= <NUM_LIT:0>), "<STR_LIT>" % ("<STR_LIT>" if rest else "<STR_LIT>"))<EOL>response = self._submitQuery(gitquery, gitvars=gitvars, verbose=(verbosity > <NUM_LIT:0>), rest=rest)<EOL>_vPrint((verbosity >= <NUM_LIT:0>), "<STR_LIT>")<EOL>_vPrint((verbosity >= <NUM_LIT:0>), response["<STR_LIT>"]["<STR_LIT:http>"])<EOL>statusNum = response["<STR_LIT>"]<EOL>pageNum -= <NUM_LIT:1><EOL>try:<EOL><INDENT>apiStatus = {<EOL>"<STR_LIT>": int(response["<STR_LIT>"]["<STR_LIT>"]),<EOL>"<STR_LIT>": int(response["<STR_LIT>"]["<STR_LIT>"]),<EOL>"<STR_LIT>": int(response["<STR_LIT>"]["<STR_LIT>"])<EOL>}<EOL>_vPrint((verbosity >= <NUM_LIT:0>), "<STR_LIT>" % (json.dumps(apiStatus)))<EOL>if not apiStatus["<STR_LIT>"] > <NUM_LIT:0>:<EOL><INDENT>_vPrint((verbosity >= <NUM_LIT:0>), "<STR_LIT>")<EOL>self._awaitReset(apiStatus["<STR_LIT>"])<EOL>_vPrint((verbosity >= <NUM_LIT:0>), "<STR_LIT>")<EOL>return self.queryGitHub(gitquery, gitvars=gitvars, verbosity=verbosity, paginate=paginate, cursorVar=cursorVar, keysToList=keysToList, rest=rest, requestCount=(requestCount - <NUM_LIT:1>), pageNum=pageNum)<EOL><DEDENT><DEDENT>except KeyError:<EOL><INDENT>_vPrint((verbosity >= <NUM_LIT:0>), "<STR_LIT>")<EOL><DEDENT>if statusNum == <NUM_LIT>:<EOL><INDENT>if requestCount >= self.maxRetry:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % (self.maxRetry, response["<STR_LIT>"]["<STR_LIT:http>"], response["<STR_LIT:result>"]))<EOL><DEDENT>else:<EOL><INDENT>self._countdown(self.__retryDelay, printString="<STR_LIT>", verbose=(verbosity >= <NUM_LIT:0>))<EOL>return self.queryGitHub(gitquery, gitvars=gitvars, verbosity=verbosity, paginate=paginate, cursorVar=cursorVar, keysToList=keysToList, rest=rest, requestCount=requestCount, pageNum=pageNum)<EOL><DEDENT><DEDENT>if statusNum == <NUM_LIT> or statusNum == <NUM_LIT>:<EOL><INDENT>if requestCount >= self.maxRetry:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % (self.maxRetry, response["<STR_LIT>"]["<STR_LIT:http>"], response["<STR_LIT:result>"]))<EOL><DEDENT>else:<EOL><INDENT>self._countdown(self.__retryDelay, printString="<STR_LIT>", verbose=(verbosity >= <NUM_LIT:0>))<EOL>return self.queryGitHub(gitquery, gitvars=gitvars, verbosity=verbosity, paginate=paginate, cursorVar=cursorVar, keysToList=keysToList, rest=rest, requestCount=requestCount, pageNum=pageNum)<EOL><DEDENT><DEDENT>if statusNum >= <NUM_LIT> or statusNum == <NUM_LIT>:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % (response["<STR_LIT>"]["<STR_LIT:http>"], response["<STR_LIT:result>"]))<EOL><DEDENT>_vPrint((verbosity >= <NUM_LIT:0>), "<STR_LIT>")<EOL>outObj = json.loads(response["<STR_LIT:result>"])<EOL>if not rest and "<STR_LIT>" in outObj:<EOL><INDENT>if requestCount >= self.maxRetry:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % (self.maxRetry, response["<STR_LIT>"]["<STR_LIT:http>"], response["<STR_LIT:result>"]))<EOL><DEDENT>elif len(outObj["<STR_LIT>"]) == <NUM_LIT:1> and len(outObj["<STR_LIT>"][<NUM_LIT:0>]) == <NUM_LIT:1>:<EOL><INDENT>_vPrint((verbosity >= <NUM_LIT:0>), "<STR_LIT>" % (json.dumps(outObj["<STR_LIT>"])))<EOL>self._countdown(self.__retryDelay, printString="<STR_LIT>", verbose=(verbosity >= <NUM_LIT:0>))<EOL>return self.queryGitHub(gitquery, gitvars=gitvars, verbosity=verbosity, paginate=paginate, cursorVar=cursorVar, keysToList=keysToList, rest=rest, requestCount=requestCount, pageNum=pageNum)<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % (json.dumps(outObj["<STR_LIT>"])))<EOL><DEDENT><DEDENT>pageNum += <NUM_LIT:1><EOL>if paginate:<EOL><INDENT>if rest and response["<STR_LIT>"]:<EOL><INDENT>if "<STR_LIT>" in response["<STR_LIT>"]:<EOL><INDENT>nextObj = self.queryGitHub(response["<STR_LIT>"]["<STR_LIT>"], gitvars=gitvars, verbosity=verbosity, paginate=paginate, cursorVar=cursorVar, keysToList=keysToList, rest=rest, requestCount=<NUM_LIT:0>, pageNum=pageNum)<EOL>outObj.extend(nextObj)<EOL><DEDENT><DEDENT>elif not rest:<EOL><INDENT>if not cursorVar:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not len(keysToList) > <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>aPage = outObj<EOL>for key in keysToList[<NUM_LIT:0>:-<NUM_LIT:1>]:<EOL><INDENT>aPage = aPage[key]<EOL><DEDENT>gitvars[cursorVar] = aPage["<STR_LIT>"]["<STR_LIT>"]<EOL>if aPage["<STR_LIT>"]["<STR_LIT>"]:<EOL><INDENT>nextObj = self.queryGitHub(gitquery, gitvars=gitvars, verbosity=verbosity, paginate=paginate, cursorVar=cursorVar, keysToList=keysToList, rest=rest, requestCount=<NUM_LIT:0>, pageNum=pageNum)<EOL>newPage = nextObj<EOL>for key in keysToList[<NUM_LIT:0>:-<NUM_LIT:1>]:<EOL><INDENT>newPage = newPage[key]<EOL><DEDENT>aPage[keysToList[-<NUM_LIT:1>]].extend(newPage[keysToList[-<NUM_LIT:1>]])<EOL><DEDENT>aPage.pop("<STR_LIT>", None)<EOL><DEDENT><DEDENT>return outObj<EOL>
Submit a GitHub query.

        Args:
            gitquery (str): The query or endpoint itself.
                Examples:
                       query: 'query { viewer { login } }'
                    endpoint: '/user'
            gitvars (Optional[Dict]): All query variables.
                Defaults to empty.
                GraphQL Only.
            verbosity (Optional[int]): Changes output verbosity levels.
                If < 0, all extra printouts are suppressed.
                If == 0, normal print statements are displayed.
                If > 0, additional status print statements are displayed.
                Defaults to 0.
            paginate (Optional[bool]): Pagination will be completed
                automatically if True. Defaults to False.
            cursorVar (Optional[str]): Key in 'gitvars' that represents the
                pagination cursor. Defaults to None.
                GraphQL Only.
            keysToList (Optional[List[str]]): Ordered list of keys needed to
                retrieve the list in the query results to be extended by
                pagination. Defaults to empty.
                Example:
                    ['data', 'viewer', 'repositories', 'nodes']
                GraphQL Only.
            rest (Optional[bool]): If True, uses the REST API instead
                of GraphQL. Defaults to False.
            requestCount (Optional[int]): Counter for repeated requests.
            pageNum (Optional[int]): Counter for pagination.
                For user readable log messages only, does not affect data.

        Returns:
            Dict: A JSON style dictionary.