File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed
Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ insert_final_newline = true
66charset = utf-8
77indent_style = space
88indent_size = 2
9+
Original file line number Diff line number Diff line change 11language : node_js
22node_js :
33- ' 0.12'
4+
Original file line number Diff line number Diff line change 11# nodejs-onesky-utils [ ![ Build Status] ( https://travis-ci.org/brainly/nodejs-onesky-utils.svg?branch=master )] ( https://travis-ci.org/brainly/nodejs-onesky-utils ) [ ![ Code Climate] ( https://codeclimate.com/github/brainly/nodejs-onesky-utils/badges/gpa.svg )] ( https://codeclimate.com/github/brainly/nodejs-onesky-utils )
2+ NodeJS utils for working with [ OneSky] ( http://www.oneskyapp.com/ ) translation service.
3+
4+ ## Example
5+
6+ ```
7+ var onesky = require("onesky-utils");
8+
9+ var options = {
10+ language: "en_EN",
11+ secret: “1234567",
12+ apiKey: “abcdefg",
13+ projectId: “123",
14+ fileName: “translations.po"
15+ };
16+
17+ onesky.getFile(options).then(function(content) {
18+ console.log(content);
19+ }).catch(function(error) {
20+ console.log(error);
21+ });
22+ ```
23+
24+ ## Install
25+
26+ ```
27+ $ npm install onesky-utils
28+ ````
29+
30+ ## API
31+
32+ ### getFile(options)
33+ Downloads translation file from OneSky.
34+
35+ Returns file content via promise.
36+
37+ The `options` object is required. Options include:
38+
39+ - **options.projectId** - numerical ID of the project
40+ - **options.fileName** - name of the translation file
41+ - **options.language** - language version
42+ - **options.secret** - secret and apiKey are used for authentication
43+ - **options.apiKey**
44+
45+ ## Tests
46+
47+ ```
48+ $ npm test
49+ ````
50+
51+ ## License
52+
53+ [MIT](./LICENSE)
You can’t perform that action at this time.
0 commit comments