Update API.md

This commit is contained in:
AJ ONeal 2017-08-02 18:21:42 -06:00
parent bd737849e3
commit 10bdac0109
1 changed files with 9 additions and 0 deletions

9
API.md
View File

@ -158,6 +158,10 @@ Special properties of `request`:
--------------------------------
```js
req.getSiteCapability(pkg) // Promises a capability on behalf of the current site (req.experienceId) without exposing secrets
req.webhookParser(pkg, req, opts) // Allows the use of potentially dangerous parsers (i.e. urlencoded) for the sake of webhooks
req.apiUrlPrefix // This represents the full package path without any package specific endpoints
// This is particularly useful when constructing webhook URLs
// i.e. https://api.example.com/api/pkg@domain.tld
@ -172,6 +176,11 @@ req.clientApiUri // The api URL for the instance of an app
req.pkgId // The name of the package being accessed
// i.e. the 'hello@example.com' part of https://api.example.com/api/hello@example.com/kv/foo
```
Internal (and/or deprecated) APIs that you will very likely encounter
```
req.getSiteStore().then(function (models) {
req.Models = models;