perceval/backends/core/confluence.py
def contents(self, from_date=DEFAULT_DATETIME,
                 offset=None, max_contents=MAX_CONTENTS):
        """Get the contents of a repository.

        This method returns an iterator that manages the pagination
        over contents. Take into account that the seconds of `from_date`
        parameter will be ignored because the API only works with
        hours and minutes.

        :param from_date: fetch the contents updated since this date
        :param offset: fetch the contents starting from this offset
        :param limit: maximum number of contents to fetch per request
        """
        resource = self.RCONTENTS + '/' + self.MSEARCH

        # Set confluence query parameter (cql)
        date = from_date.strftime("%Y-%m-%d %H:%M")
        cql = self.VCQL % {'date': date}

        # Set parameters
        params = {
            self.PCQL: cql,
            self.PLIMIT: max_contents,
            self.PEXPAND: self.PANCESTORS
        }

        if offset:
            params[self.PSTART] = offset

        for response in self._call(resource, params):
            yield response
def contents(self, from_date=DEFAULT_DATETIME,
                 offset=None, max_contents=MAX_CONTENTS):
        resource = self.RCONTENTS + '/' + self.MSEARCH

        # Set confluence query parameter (cql)
        date = from_date.strftime("%Y-%m-%d %H:%M")
        cql = self.VCQL % {'date': date}

        # Set parameters
        params = {
            self.PCQL: cql,
            self.PLIMIT: max_contents,
            self.PEXPAND: self.PANCESTORS
        }

        if offset:
            params[self.PSTART] = offset

        for response in self._call(resource, params):
            yield response
def contents ( self , from_date = DEFAULT_DATETIME , offset = None , max_contents = MAX_CONTENTS ) : resource = self . RCONTENTS + '/' + self . MSEARCH # Set confluence query parameter (cql) date = from_date . strftime ( "%Y-%m-%d %H:%M" ) cql = self . VCQL % { 'date' : date } # Set parameters params = { self . PCQL : cql , self . PLIMIT : max_contents , self . PEXPAND : self . PANCESTORS } if offset : params [ self . PSTART ] = offset for response in self . _call ( resource , params ) : yield response
Get the contents of a repository.

        This method returns an iterator that manages the pagination
        over contents. Take into account that the seconds of `from_date`
        parameter will be ignored because the API only works with
        hours and minutes.

        :param from_date: fetch the contents updated since this date
        :param offset: fetch the contents starting from this offset
        :param limit: maximum number of contents to fetch per request
Get the contents of a repository .