Add Travis and Apache 2 license badges; adjust text to reference ASF APIs. (#55)
diff --git a/README.md b/README.md
index 27261c0..bd87cca 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,10 @@
-# openwhisk-client-js
+# OpenWhisk Client for JavaScript
-JavaScript client library for the [OpenWhisk](https://github.com/openwhisk/openwhisk) platform.
-Provides a wrapper around the [OpenWhisk APIs](https://new-console.ng.bluemix.net/apidocs/98#introduction).
+[![Build Status](https://travis-ci.org/apache/incubator-openwhisk-client-js.svg?branch=master)](https://travis-ci.org/apache/incubator-openwhisk-client-js)
+[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
+
+JavaScript client library for the [Apache OpenWhisk](https://github.com/apache/incubator-openwhisk) platform.
+Provides a wrapper around the [OpenWhisk APIs](https://github.com/apache/incubator-openwhisk/blob/fb001afa237476eda0c0f6494ee92702e5986538/core/controller/src/main/resources/apiv1swagger.json) (Swagger JSON).
## installation
@@ -19,7 +22,7 @@
var openwhisk = require('openwhisk');
function action() {
- var ow = openwhisk();
+ var ow = openwhisk();
return ow.actions.invoke('sample')
}
@@ -39,9 +42,9 @@
```
var openwhisk = require('openwhisk');
// DOES NOT WORK! Environment parameters not set.
-var ow = openwhisk();
+var ow = openwhisk();
-function action() {
+function action() {
return ow.actions.invoke('sample')
}
@@ -149,7 +152,7 @@
})
```
-### chaining calls
+### chaining calls
```
ow.actions.list()
@@ -201,13 +204,13 @@
-## API Details
+## API Details
### resource identifiers + namespaces
-When passing resource identifiers as parameters you can either use a short name, without an explicit namespace, or a fully-qualified identifier, including namespace and package details.
+When passing resource identifiers as parameters you can either use a short name, without an explicit namespace, or a fully-qualified identifier, including namespace and package details.
-If the namespace is missing from the resource identifier, the client will use the namespace from configuration options following this ordering.
+If the namespace is missing from the resource identifier, the client will use the namespace from configuration options following this ordering.
- `namespace` from method parameter options OR
- `namespace` from options passed into client constructor OR
@@ -234,7 +237,7 @@
The following optional parameters are supported:
- `namespace` - set custom namespace for endpoint
-### retrieve resource
+### retrieve resource
```
ow.actions.get({name: '...'})
@@ -261,7 +264,7 @@
ow.actions.get(["a", {name: "b"}])
```
-### delete resource
+### delete resource
```
ow.actions.delete({name: '...'})
@@ -324,7 +327,7 @@
The following mandatory parameters are supported:
- `name` - action identifier
-- `action` - String containing JS function source code, Buffer [containing package action zip file](https://github.com/openwhisk/openwhisk/blob/master/docs/actions.md#packaging-an-action-as-a-nodejs-module) or JSON object containing full parameters for the action body
+- `action` - String containing JS function source code, Buffer [containing package action zip file](https://github.com/openwhisk/openwhisk/blob/master/docs/actions.md#packaging-an-action-as-a-nodejs-module) or JSON object containing full parameters for the action body
The following optional parameters are supported:
- `namespace` - set custom namespace for endpoint
@@ -394,7 +397,7 @@
(`/custom_ns/action_or_trigger_name`).
The following optional parameters are supported:
-- `namespace` - set namespace for rule
+- `namespace` - set namespace for rule
### enable & disable rule
@@ -434,7 +437,7 @@
The following optional parameters are supported to filter the result set:
- `relpath` - relative URI path for endpoints
- `basepath` - base URI path for endpoints
-- `operation` - HTTP methods
+- `operation` - HTTP methods
- `limit` - limit result set size
- `skip` - skip results from index
@@ -448,7 +451,7 @@
The following optional parameters are supported to filter the result set:
- `relpath` - relative URI path for endpoints
-- `operation` - HTTP methods
+- `operation` - HTTP methods
### add route
```
@@ -465,7 +468,7 @@
Setting an environment parameter (`NODE_DEBUG=request`) will dump the HTTP requests from the client library and responses received to `stderr`.
```
-NODE_DEBUG=request node script.js
+NODE_DEBUG=request node script.js
```
This parameter can also be set dynamically at runtime, provided this happens before the `openwhisk` module is required.