feat: Update to the new SDK

This commit is contained in:
Khaled Garbaya
2018-04-19 15:53:02 +02:00
committed by Khaled Garbaya
parent 1baef21340
commit 8a2b7dc649
33 changed files with 27 additions and 17 deletions

View File

@@ -51,6 +51,16 @@ module.exports.getSpace = throwOnEmptyResult('Space', (api = 'cda') => {
return getClient(api).getSpace()
})
/**
* Get the environment locales
* @param api - string - the api to use, cda or cap. Default: 'cda'
* @returns {undefined}
*/
module.exports.getLocales = throwOnEmptyResult('Environment', (api = 'cda') => {
return getClient(api).getLocales()
.then((response) => response.items)
})
/**
* Gets an entry. Used to detect the `Draft` or `Pending Changes` state
* @param entryId - string - the entry id