def top_level(self, request, api_name=None):
        available_resources = {}

        if api_name is None:
            api_name = self.api_name

        for name in sorted(self._registry.keys()):
            available_resources[name] = {
                'list_endpoint': self._build_reverse_url("api_dispatch_list", kwargs={
                    'api_name': api_name,
                    'resource_name': name,
                }),
                'schema': self._build_reverse_url("api_get_schema", kwargs={
                    'api_name': api_name,
                    'resource_name': name,
                }),
            }

        desired_format = determine_format(request, self.serializer)
        options = {}

        if 'text/javascript' in desired_format:
            callback = request.GET.get('callback', 'callback')

            if not is_valid_jsonp_callback_value(callback):
                raise BadRequest('JSONP callback name is invalid.')

            options['callback'] = callback

        serialized = self.serializer.serialize(available_resources, desired_format, options)
        return self.response_generator.create(HttpOK(content=serialized, content_type=build_content_type(desired_format)))
See lfs.plugins.PriceCalculator
dataset/ETHPy150Open toastdriven/piecrust/piecrust/api.py/Api.top_level--crossover with--dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/models.py/Product.get_standard_price