Skip to content
🌏 Javascript API wrapper for Loco translation system's REST API
Branch: master
Clone or download
Latest commit 47c8a67 Jan 28, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add support for exporting locales and listing locales Jan 28, 2019
.gitignore Add ignored export files Jan 28, 2019
LICENSE Add README, LICENSE and an exa,ple Jan 15, 2019
README.md Update readme, update example Jan 28, 2019
example.js Add support for exporting locales and listing locales Jan 28, 2019
package-lock.json
package.json 0.1.0-beta.2 Jan 28, 2019

README.md

loco-api-js

standard-readme compliant latest-release license npm-latest size-cjs size-es

Javascript API wrapper for Loco translation system's REST API

Convenience API wrapper around the Loco REST API, written in modern Javascript. Modules are provided as CommonJS, UMD and ESM.

Table of Contents

Install

npm i loco-api-js
yarn add loco-api-js

Usage

See and run example.js or try it out in a REPL

// ESM (Bundlers, Modern engines)
import LocoClient from 'loco-api-js';

// CJS (Node)
const LocoClient = require('loco-api-js');

const loco = new LocoClient('<your-api-key>');

(async () => {
  console.log(await loco.getAssets());
  console.log(await loco.getAsset('some.asset.path'));
  console.log(await loco.getAsset(['some', 'asset', 'path']));
  console.log(await loco.getAssetsByTags(['1.5.0']));
  console.log(await loco.exportArchive());
})();

API

Maintainers

@thibmaek

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT Β© 2019 Thibault Maekelbergh

You can’t perform that action at this time.