예제 #1
0
 def resolve_user_actions(self, info, skip=None, first=None):
     result = user_actions.get(self.name)
     if skip:
         result = result[skip:]
     if first:
         result = result[:first]
     return result
예제 #2
0
    def resolve_user_actions(self, info, pattern="*", first=None, skip=None):
        """ This method fetches the user actions.

        :param name: Name of the user.
        :type name: str

        :return:  Log.
        :rtype: Log    
        """
        result = user_actions.get(pattern)
        if skip:
            result = result[skip:]

        if first:
            result = result[:first]

        return result