node-aem-api
Warning this is under development. Tests are sparse or incomplete. Use at your own peril.
Installation
npm install --save-dev aem-api
Usage
Initialize and instance of aem-api
with you credentials, then call any of the listed methods. They
will all return a promise.
const AEM = ; const aem = 'http://localhost' 4502 'admin' 'admin'; aem
Best Practises
This api returns promises by design even a synchronous response would suffice for ease of use, mainly with generators in mind. With this, it is recommended to use generators where possible for cleaner more readable code.
const AEM = ; const aem = 'http://localhost' 4502 'admin' 'admin'; const runner = { const myNode = aem; myNode; console;}
Todo
Change almost all response that return a promise to the http response. They're pretty much useless and should remain "behind closed doors". You only want a node object to mess with or an error. Then promise chaining becomes a lot more viable.- Tests
- Economise on http requests where possible (Node#getProperties i'm looking at you...)
Ability to lock and unlock nodes
API
HTML documentation can be viewed here