Builds the url of the resource's index.

        :param resource: name of the resource or None
        :param kwargs: additional keyword arguments to build the url
        :return: url of the resource's index

def get_index_url(self, resource=None, **kwargs):
        """
        Builds the url of the resource's index.

        :param resource: name of the resource or None
        :param kwargs: additional keyword arguments to build the url
        :return: url of the resource's index
        """
        default_kwargs = self.default_kwargs_for_urls() \
            if resource == self.get_resource_name() else {}

        default_kwargs.update(kwargs)

        return self.get_full_url(
            self.app.reverse(
                '{}_index'.format(resource or self.get_resource_name()),
                **default_kwargs
            )
        )