shreddd/newt-2.0 — pull request #1 by ttsun (2014-06-10 23:47:10+00:00)
Title: Implemented all basic features

# Summary
Created modules for stores and account. Most features are working, but app as a whole is not secured.

## Stores
- Created mongo_adapter
- Started Redis Adapter (ran into problems, needs work)
- API Scheme:

API Call | Response
------------- | -------------
GET /stores/ | lists stores
POST /stores/ | creates a store with a random name
GET /stores/\/ | gets information about a store
POST /stores/\/ | creates a store with the given name and adds documents given in the post data as {"data": "..."}
DEL /stores/\/ | deletes the store with the given name if it exists and associated permissions
GET /stores/\/\/ | gets the data of the object (document)
PUT /stores/\/\/ | updates the data of the object (document)
DEL /stores/\/\/ | deletes the object
GET /stores/\/perms/ | lists the permissions of the store
POST /stores/\/perms/ | updates the permissions from the post data as {"data": json.dumps({"name": ..., "perms": ['r','w']})}

## Account
API Call | Response
------------- | -------------
GET /account/user/\/ | lists the information for the given username
GET /account/user/id/\/ | lists the information for the given user id
GET /account/group/\/ | lists the information for the given group name
GET /account/group/\/ | lists the information for the given group id

- All other GET requests to /account// is passed to OtherInfoView which handles the other functionality to be implemented by the backend. Default: Returns Http501 - Unimplemented.

## Other Stuff
- json_response now indents the response in a human readable format (indent=4).
- local_file_adapter.py upload handler fixed (didn't work before)
- main test.py file updated with Account and Stores tests: Tests basic functionality as listed above

## ToDo
- Implement some sort of access control across the NEWT app (?)
- Implement Redis stores backend
- Document adapter format for each module
- ???