Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crowdin-node/crowdin-node
A Node.js client for the v1 and v2 Crowdin APIs
https://github.com/crowdin-node/crowdin-node
Last synced: 5 days ago
JSON representation
A Node.js client for the v1 and v2 Crowdin APIs
- Host: GitHub
- URL: https://github.com/crowdin-node/crowdin-node
- Owner: crowdin-node
- Created: 2019-07-24T23:07:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-19T05:39:29.000Z (over 4 years ago)
- Last Synced: 2024-10-28T20:44:23.743Z (14 days ago)
- Language: JavaScript
- Homepage:
- Size: 163 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crowdin API Client
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors)A Node.js client for the
[v1](https://support.crowdin.com/api/api-integration-setup/) and
[v2](https://support.crowdin.com/enterprise/api/) Crowdin APIsπ§ This is still a work in progress. To see what remains to be implemented, check out the [open issues](https://github.com/crowdin-node/crowdin-node/issues). π§
## Installation
```sh
npm install crowdin
```## Basic Usage
```js
const crowdin = require('crowdin')({
key: process.env.CROWDIN_KEY,
schemaVersion: 'v2'
})const projects = await crowdin.projects.getMany()
```## Examples
To try out some examples, clone the repo and install dependencies:
```sh
git clone https://github.com/aletrejo/crowdin-wrapper
cd crowdin-wrapper
npm install
```Then you can run the examples:
```js
node examples/v1-get-project-details.js
node examples/v2-add-files.js
```## API
This module exports a single [factory function](https://www.youtube.com/watch?v=ImwrezYhw4w)
that returns a Crowdin client:### `createClient([options])`
- `options` Object
- `key` String - Your Crowdin API key. Required.
- `schemaVersion` String (optional) - Γan be `v1` or `v2`. Defaults to `v2`.
- `hostname` String (optional) - Defaults to `api.crowdin.com`The returned client is an object of deeply nested API operations like
`crowdin.projects.files.getMany` and `crowdin.projects.branches.languages.progress.getMany`.
Each of these operations returns a Promise to a [got](https://ghub.io/got) response object.See [docs/v1.md](docs/v1.md) and [docs/v2.md](docs/v2.md) for reference.
## Thanks
Special thanks to :sparkles:[Paul Le Cam](https://www.npmjs.com/~paul_lecam):sparkles: for donating the `crowdin` npm package name.
## Contributors β¨Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Alejandra Trejo
π» π β οΈ π
Zeke Sikelianos
π π¨ π€ π»
TomPradat
π
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!