mast/queries.py
def _get_top_users_total_distance(self, activity_types: list, number: int, offset: int = 0):
        """
        Returns top users in the total distance in specified activity types.
        :param activity_types: Types of activities we want to sum to total distance.
        :param number: Number of users in the top users list.
        :param offset: Offset of returned activities - default: 0.
        :returns: Total count of users and list of top users and their total distance.
        """
        query = self._get_top_users_total_distance_query(activity_types)
        count = query. \
            count()
        items = query. \
            limit(number). \
            offset(offset). \
            all()
        return [count, items]

        Returns top users in the total distance in specified activity types.
        :param activity_types: Types of activities we want to sum to total distance.
        :param number: Number of users in the top users list.
        :param offset: Offset of returned activities - default: 0.
        :returns: Total count of users and list of top users and their total distance.
        
Returns top users in the total distance in specified activity types.
Returns top users in the total distance in specified activity types .
def _get_top_users_total_distance(self, activity_types: list, number: int, offset: int = 0):
        query = self._get_top_users_total_distance_query(activity_types)
        count = query. \
            count()
        items = query. \
            limit(number). \
            offset(offset). \
            all()
        return [count, items]
def _get_top_users_total_distance ( self , activity_types : list , number : int , offset : int = 0 ) : query = self . _get_top_users_total_distance_query ( activity_types ) count = query . count ( ) items = query . limit ( number ) . offset ( offset ) . all ( ) return [ count , items ]
Returns top users in the total distance in specified activity types.
Returns top users in the total distance in specified activity types .
"""
        Returns top users in the total distance in specified activity types.
        :param activity_types: Types of activities we want to sum to total distance.
        :param number: Number of users in the top users list.
        :param offset: Offset of returned activities - default: 0.
        :returns: Total count of users and list of top users and their total distance.
        """
Total count of users and list of top users and their total distance.
Total count of users and list of top users and their total distance .
self
activity_types
list
Types of activities we want to sum to total distance.
Types of activities we want to sum to total distance .
number
int
Number of users in the top users list.
Number of users in the top users list .
offset
int
Offset of returned activities - default: 0.
Offset of returned activities - default : 0 .