New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

onesky-utils

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onesky-utils - npm Package Compare versions

Comparing version 0.0.3 to 1.0.0

lib/getMultilingualFile.js

1

index.js

@@ -10,3 +10,4 @@

getFile: rootRequire('lib/getFile.js'),
getMultilingualFile: rootRequire('lib/getMultilingualFile.js'),
postFile: rootRequire('lib/postFile.js')
};

4

package.json
{
"name": "onesky-utils",
"version": "0.0.3",
"description": "",
"version": "1.0.0",
"description": "Node.js utils for working with OneSky translation service.",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -8,3 +8,3 @@ # 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) [![npm version](https://badge.fury.io/js/onesky-utils.svg)](http://badge.fury.io/js/onesky-utils)

```
```js
var onesky = require('onesky-utils');

@@ -26,6 +26,27 @@

```
### getMultiLingualFile
```js
var onesky = require('onesky-utils');
var options = {
language: 'en_EN',
secret: '1234567',
apiKey: 'abcdefg',
projectId: '123',
fileName: 'translations.po',
format: 'I18NEXT_MULTILINGUAL_JSON'
};
onesky.getMultiLingualFile(options).then(function(content) {
console.log(content);
}).catch(function(error) {
console.log(error);
});
```
### postFile
```
```js
var onesky = require('onesky-utils');

@@ -66,8 +87,22 @@

- **options.projectId** - numerical ID of the project
- **options.fileName** - name of the translation file
- **options.language** - language version
- **options.secret** - secret and apiKey are used for authentication
- **options.projectId** - Numerical ID of the project
- **options.fileName** - Name of the translation file
- **options.language** - Language version
- **options.secret** - `secret` and `apiKey` are used for authentication
- **options.apiKey**
### getMultiLingualFile(options)
Downloads multi-language translations from OneSky.
Returns file content via promise.
The `options` object is required. Options include:
- **options.projectId** - Numerical ID of the project
- **options.fileName** - Name of the translation file
- **options.format** - Response file format (Optional. Defaults to `I18NEXT_MULTILINGUAL_JSON`)
- **options.language** - Language version
- **options.secret** - `secret` and `apiKey` are used for authentication
- **options.apiKey**
### postFile(options)

@@ -78,9 +113,9 @@ Uploads translation file to OneSky.

- **options.projectId** - numerical ID of the project
- **options.fileName** - name of the translation file
- **options.language** - language version
- **options.format** - file format ([list here](https://github.com/onesky/api-documentation-platform/blob/master/reference/format.md))
- **options.content** string with the content of the file
- **options.keepStrings** boolean saying if already uploaded strings not present on this file should be deprecated or keept
- **options.secret** - secret and apiKey are used for authentication
- **options.projectId** - Numerical ID of the project
- **options.fileName** - Name of the translation file
- **options.language** - Language version
- **options.format** - File format ([list here](https://github.com/onesky/api-documentation-platform/blob/master/reference/format.md))
- **options.content** String with the content of the file
- **options.keepStrings** Boolean saying if already uploaded strings not present on this file should be deprecated or keept
- **options.secret** - `secret` and `apiKey` are used for authentication
- **options.apiKey**

@@ -87,0 +122,0 @@

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