def summarize(self, sentences=0, chars=0):
        """ Summarize page either by number of sentences, chars, or first
            section (**default**)

            Args:
                sentences (int): Number of sentences to use in summary \
                                 (first `x` sentences)
                chars (int): Number of characters to use in summary \
                             (first `x` characters)
            Returns:
                str: The summary of the MediaWiki page
            Note:
                Precedence for parameters: sentences then chars; if both are \
                0 then the entire first section is returned """
        query_params = {"prop": "extracts", "explaintext": "", "titles": self.title}
        if sentences:
            query_params["exsentences"] = 10 if sentences > 10 else sentences
        elif chars:
            query_params["exchars"] = 1 if chars < 1 else chars
        else:
            query_params["exintro"] = ""

        request = self.mediawiki.wiki_request(query_params)
        summary = request["query"]["pages"][self.pageid]["extract"]
        return summary
def summarize ( self , sentences = 0 , chars = 0 ) : query_params = { "prop" : "extracts" , "explaintext" : "" , "titles" : self . title } if sentences : query_params [ "exsentences" ] = 10 if sentences > 10 else sentences elif chars : query_params [ "exchars" ] = 1 if chars < 1 else chars else : query_params [ "exintro" ] = "" request = self . mediawiki . wiki_request ( query_params ) summary = request [ "query" ] [ "pages" ] [ self . pageid ] [ "extract" ] return summary
Summarize page either by number of sentences, chars, or first
            section (**default**)

            Args:
                sentences (int): Number of sentences to use in summary \
                                 (first `x` sentences)
                chars (int): Number of characters to use in summary \
                             (first `x` characters)
            Returns:
                str: The summary of the MediaWiki page
            Note:
                Precedence for parameters: sentences then chars; if both are \
                0 then the entire first section is returned