Refactor API arguments
closes #2610, refs #2697
- cleanup API index.js, and add docs
- all API methods take consistent arguments: object & options
- browse, read, destroy take options, edit and add take object and options
- the context is passed as part of options, meaning no more .call
everywhere
- destroy expects an object, rather than an id all the way down to the model layer
- route params such as :id, :slug, and :key are passed as an option & used
to perform reads, updates and deletes where possible - settings / themes
may need work here still
- HTTP posts api can find a post by slug
- Add API utils for checkData
2014-05-08 07:41:19 -05:00
|
|
|
// Posts
|
2013-11-02 18:40:43 -05:00
|
|
|
var blanket = require("blanket")({
|
2014-02-26 18:15:31 -05:00
|
|
|
"pattern": ["/core/server/", "/core/clientold/", "/core/shared/"],
|
|
|
|
"data-cover-only": ["/core/server/", "/core/clientold/", "/core/shared/"]
|
2013-11-11 15:54:48 -05:00
|
|
|
}),
|
2013-11-02 18:40:43 -05:00
|
|
|
requireDir = require("require-dir");
|
|
|
|
|
Refactor API arguments
closes #2610, refs #2697
- cleanup API index.js, and add docs
- all API methods take consistent arguments: object & options
- browse, read, destroy take options, edit and add take object and options
- the context is passed as part of options, meaning no more .call
everywhere
- destroy expects an object, rather than an id all the way down to the model layer
- route params such as :id, :slug, and :key are passed as an option & used
to perform reads, updates and deletes where possible - settings / themes
may need work here still
- HTTP posts api can find a post by slug
- Add API utils for checkData
2014-05-08 07:41:19 -05:00
|
|
|
|
2013-11-02 18:40:43 -05:00
|
|
|
requireDir("./unit");
|
2014-05-03 08:34:41 -05:00
|
|
|
requireDir("./integration");
|
2014-05-07 16:28:29 -05:00
|
|
|
requireDir("./functional/routes");
|