Skip to content

Commit ba4d261

Browse files
committed
add example/api/license sections to the README file
1 parent a08dac6 commit ba4d261

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ insert_final_newline = true
66
charset = utf-8
77
indent_style = space
88
indent_size = 2
9+

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
language: node_js
22
node_js:
33
- '0.12'
4+

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,53 @@
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)

0 commit comments

Comments
 (0)