# index. if given name as CGI variable, acts just like GET /name
# read if exists, "new" form if not
# read in specified view if exists, "new" form if not.
# new card form
# create new card
# update card
# delete card (move to trash)
Cards can be identified in three ways:
- name - default
- codename - begins with ":"
- id - begins with "~"
Names can be given in CGI params or in path. Error if 2 different names are given. Note that if a nonexistent codename or id is given in a normal GET request, response is 404 (not "new")
You can add ".<format extension>" to the end of any requests to specify the response file formats.
- view args - eg layout, view, item, size, keyword
- action args - (not sure what those are yet)
- model args for PUTS and POSTS - eg name, type, content
Currently those model args come as card[name], card[type], etc. We need to decide if that is still valuable (for example, in separating them from view/action args and how to specify nested cards, which will probably be some variant on that pseudo-hash structure.
POST /name -> GET /create/name
PUT /name -> GET /update/name
DELETE /name -> GET /delete/name
# and, for consistency...
GET /name -> GET /read/name