Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crowdin-node

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crowdin-node

Download translations from Crowdin

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

crowdin-node

Node module for accessing the Crowdin API

Disclaimer

This is an unofficial API client library. Crowdin and the Crowdin API are the property of Crowdin, LLC.

Install

npm install crowdin

Usage

apiKey and endpointUrl parameters must be set to create the instance, an error will be thrown otherwise.

var crowdin = new Crowdin({
    apiKey: '7d38782fa7cb4b6a9fbae2de65e91989',
    endpointUrl: 'https://api.crowdin.net/api/project/<your-project>'
});

API

.requestData(Object parameters)

Returns a Promise of a call to the API endpoint with specified parameters.
Parses the response body and rejects if the API returns an error.

.getRequest(String endpoint)

Returns a Promise of a GET request to the set API endpoint. Uses requestData().

.postRequest(String endpoint)

Returns a Promise of a POST request to the set API endpoint. Uses requestData().

.getInfo()

Returns a Promise of project information. Uses postRequest().

.getLanguages()

Returns a Promise of project languages. Uses getInfo().

.export()

Returns a Promise of an API call to the export endpoint. Uses getRequest().

.download()

Downloads the translations ZIP and returns the Stream.
You might call export() before to ensure you have the latest translations.

.downloadToStream(Stream)

Downloads the translations ZIP to the specified stream. Uses download() and returns an empty Promise.

.downloadToZip(String path)

Downloads the translations ZIP to the specified path. Uses download() and returns an empty Promise.

.downloadToPath(String path)

Downloads and extracts the translations ZIP to the specified path. Uses download() and returns an empty Promise.

.downloadAndParse()

Downloads and parses the translations ZIP. Uses download() and returns the Stream of file entries. See the node-unzip documentation.

.downloadToObject()

Downloads, extracts and converts the translations ZIP to a JS object. Returns a Promise.

Tests

Tests are written with mocha

npm test

Coverage using istanbul

npm run coverage

License

Apache 2.0
Copyright 2015 Hailo

Keywords

FAQs

Package last updated on 10 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc