Globalization Pipeline API
==========================

- back to [README.md](README.md)

API convention
==

Most APIs will return a promise. APIs that return a promise are either identified as `async`
or have the optional callback (`cb`) parameter. These APIs can be used using `async/await`
or else with `.then(…)`

```javascript
    await gpClient.ping();
```


```javascript
    gpClient.ping( { /* opts */ })
    .then( result => /* do something with result */)
    .catch( err => /* do something with err */ );
```

* opts: an object containing input parameters, if needed.

### Callback mode (deprecated)

Prior to v2.0, only the callback model was supported. This is still supported
for some APIs, but is deprecated.

```javascript
    gpClient.function( { /*opts*/ } ,  function callback(err, result))
```

* opts: an object containing input parameters, if needed.
* callback: a callback with:
    - `err`: if truthy, indicates an error has occured.
    - `result`: the operation’s result

Sometimes the `opts` object is optional. If this is the case, the
API doc will indicate it with this notation:  `[opts]`
For example,  `bundle.getInfo(cb)` and `bundle.getInfo({}, cb)`  are equivalent.

### Naming

Also, note that there are aliases from the swagger doc function names
to the convenience name. For example, `bundle.uploadResourceStrings` can be 
used in place of `bundle.uploadStrings`.

All language identifiers are [IETF BCP47](http://tools.ietf.org/html/bcp47) codes.

API reference
===

{{>main}}

*docs autogenerated via [jsdoc2md](https://github.com/jsdoc2md/jsdoc-to-markdown)*

Community
===
* View or file GitHub [Issues](https://github.com/IBM-Cloud/gp-js-client/issues)
* Connect with the open source community on [developerWorks Open](https://developer.ibm.com/open/ibm-bluemix-globalization-pipeline/node-js-sdk/)

Contributing
===
See [CONTRIBUTING.md](CONTRIBUTING.md).

License
===
Apache 2.0. See [LICENSE.txt](LICENSE.txt)

> Licensed under the Apache License, Version 2.0 (the "License");
> you may not use this file except in compliance with the License.
> You may obtain a copy of the License at
> 
> http://www.apache.org/licenses/LICENSE-2.0
> 
> Unless required by applicable law or agreed to in writing, software
> distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> See the License for the specific language governing permissions and
> limitations under the License.
