noyainrain / listling

Web app to make and edit lists collaboratively.
https://listling.org/
GNU Affero General Public License v3.0
34 stars 8 forks source link

Query list users #67

Closed noyainrain closed 4 years ago

noyainrain commented 4 years ago

Provide a convenient way to reference users who interacted with a list.

noyainrain commented 4 years ago

Draft:

class List:
    def users(self, name: str = '') -> typing.List[User]:
        """
        .. http:get:: /api/lists/(id)/users?name=

           Query users who interacted with the list and (partially) match *name*.

           *name* defaults to an empty string, matching all users. A maximum of 10 items is
           returned.
        """

# Acquaintances (future reference)

class User:
    def acquaintances(self, name: str = '', context: List = None) -> typing.List[User]:
        ...
noyainrain commented 4 years ago

Depends on noyainrain/micro#93 .