notlion/YASE — pull request #1 by quilime (2012-08-04 01:18:06+00:00)
Title: Added ability to save shaders with Mongoose/MongoDB

Added the following endpoints:

/get
@param: integer skip
@param: integer limit
@description: gets shaders, sorted by date

/count
@description: gets total count of shaders in db

/s/:short_id
@param: string short_id (shader short id)
@description: get a shader by its short id

/save
@param: array r (rotation)
@param: float d (distance)
@param: string z (shader lzma)
@description: saves shader to DB

Saving is implemented with a (temporary) "link" button in the UI. Perhaps this could be integrated into the existing "save" button.

When "link" is clicked, the current shader+params get posted to the db returns the saved shader to the console.

Shaders can be retrieved via /get or /s/