Add new file

This commit is contained in:
AJ ONeal 2017-08-02 15:41:10 -06:00
parent e66e92cae3
commit 45f1d38592
1 changed files with 39 additions and 0 deletions

39
API.md Normal file
View File

@ -0,0 +1,39 @@
API docs are here https://git.daplie.com/Daplie/com.example.hello
```
req.apiUrlPrefix => https://api.example.com/api/tld.domain.pkg
```
Partial WALNUT API docs
----------------
```
req.experienceId // the example.com part of https://example.com/foo (or example.com#foo if /foo is part of the app name)
req.clientApiUri // the api.example.com part of https://api.example.com/api/com.example.hello/kv/foo
req.pkgId // the com.example.hello part of https://api.example.com/api/com.example.hello/kv/foo
req.getSiteStore().then(function (models) {
req.Models = models;
});
req.Models.ComExampleHelloData.create(obj)
req.Models.ComExampleHelloData.save(obj)
req.Models.ComExampleHelloData.find(params)
req.Models.ComExampleHelloData.destroy(objOrId)
req.oauth3.accountIdx // The system id of the account represented by the token
req.getSiteConfig('com.example.hello').then(function (config) {
// the com.example.hello section of /srv/walnut/etc/:domain/config.json
});
req.getSitePackageConfig
req.getSiteMailer().then(function (mailer) {});
// helper methods until we have agnostic means of doing the same / similar tasks
req.Stripe
req.Mandrill
req.Mailchimp
```