@w3cub/locize-node-actions
v5.1.2
Published
Using API actions from serverside
Downloads
5
Readme
This is a standalone scriot to be used for locize api service.
Getting started
Source can be loaded via npm
# npm package
$ npm install @w3cub/locize-node-actions
Options
{
// the id of your locize project
projectId: '[PROJECTID]',
// add an api key if you want to send missing keys
apiKey: '[APIKEY]',
// the reference language of your project
referenceLng: '[LNG]',
// version - defaults to latest
version: '[VERSION]',
// debounce interval to send data in milliseconds
debounceSubmit: 90000,
// action path formatter
actionPath: 'https://api.locize.app/{{action}}/{{projectId}}/{{version}}/{{lng}}/{{ns}}',
}
Directly call locizeactions.init:
import locizeactions from "locize-node-actions";
locizeactions.init(options);
then call used function with namespace and key:
import locizeactions from "locize-node-actions";
locizeActions.actions('action', "myNamespace", "myKey.as.in.locize", "myKey.as.the.value", (obj)=> {
// parse function
// for missing action
return Object.keys(obj)
//
});