-
Notifications
You must be signed in to change notification settings - Fork 8
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
Labels
Comments
Depends on noyainrain/micro#68. |
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:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a personal landing page for the user displaying the user's lists (bookmarked lists).
The text was updated successfully, but these errors were encountered: