Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user home page #25

Closed
noyainrain opened this issue Jun 10, 2018 · 2 comments
Closed

Add user home page #25

noyainrain opened this issue Jun 10, 2018 · 2 comments

Comments

@noyainrain
Copy link
Owner

Create a personal landing page for the user displaying the user's lists (bookmarked lists).

@noyainrain noyainrain changed the title User home page Add user home page Apr 30, 2019
@noyainrain
Copy link
Owner Author

Depends on noyainrain/micro#68.

@noyainrain noyainrain self-assigned this May 28, 2019
@noyainrain
Copy link
Owner Author

noyainrain commented Jun 5, 2019

Draft:

class User(micro.User):
    """
    .. attribute:: lists

       class:`Lists` of the user.
    """

    class Lists(Collection):
        """
        :ref:`List`s of the user, ordered by time added, latest first.

        Lists created by the user are added automatically.
        """

        def add(self, lst, *, user):
            """
            .. http:post:: /users/(id)/lists

            ``{"list_id"}``

            Add the list with *list_id*.

            If the list is already in the collection, the associated time is updated. If there is no
            list with *list_id*, a :ref:`ValueError` is returned.

            Permission: The user oneself.
            """

        def remove(self, lst, *, user):
            """
            If *lst* is not in the collection, a :exc:`micro.error.ValueError` is raised.

            --

            .. http:delete:: /users/(user-id)/lists/(id)

            Remove the list with *id*.

            If the user is the list owner, a :ref:`ValueError` is returned.

            Permission: The user oneself.
            """

UI draft:

home-page

  • /intro: Present start page, reachable via "Introduction" menu item
  • /: If user has no lists yet, redirect to /intro

@noyainrain noyainrain mentioned this issue Jun 8, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant