Skip to content

Commit

Permalink
Merge branch 'master' of github.com:germanattanasio/vcap_services
Browse files Browse the repository at this point in the history
  • Loading branch information
germanattanasio committed Sep 30, 2015
2 parents 45eb547 + 015dfdd commit 57dae8b
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# VCAP_SERVICES

============================================
[![Build Status](https://secure.travis-ci.org/vcap_services/vcap_services.png)](http://travis-ci.org/germanattanasio/vcap_services)
[![Coverage Status](https://img.shields.io/coveralls/germanattanasio/vcap_services.svg)](https://coveralls.io/r/germanattanasio/vcap_services)

[![npm-version](https://img.shields.io/npm/v/vcap_services.svg)](https://www.npmjs.com/package/vcap_services)
[![npm-downloads](https://img.shields.io/npm/dm/vcap_services.svg)](https://www.npmjs.com/package/vcap_services)

Expand All @@ -17,13 +15,11 @@ $ npm install vcap_services --save

## Usage

`getCredentials(name)`
--------
* `name` - service name

if `VCAP_SERVICES` exists then it returns the first credentials object for the service that starts with 'name' or {} otherwise.

### Example
```sh
var vcapServices = require('vcap_services');
var credentials = vcapServices.getCredentials('personality_insights');
console.log(credentials);
```

If `VCAP_SERVICES` is:
```sh
Expand All @@ -43,12 +39,6 @@ If `VCAP_SERVICES` is:
}
```

```sh
var vcapServices = require('vcap_services');
var credentials = vcapServices.getCredentials('personality_insights');
console.log(credentials);
```

Output:
```json
{
Expand All @@ -75,4 +65,4 @@ $ mocha -g '<test name>'
MIT.

## Contributing
See [CONTRIBUTING](https://github.com/germanattanasio/vcap_services/blob/master/CONTRIBUTING.md).
See [CONTRIBUTING](https://github.com/germanattanasio/vcap_services/blob/master/CONTRIBUTING.md).

0 comments on commit 57dae8b

Please sign in to comment.