diff --git a/API.md b/API.md new file mode 100644 index 0000000..d49ed0e --- /dev/null +++ b/API.md @@ -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 +```