You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/02/07 19:45:33 UTC

[GitHub] lornajane commented on a change in pull request #3244: Move parameter docs to separate page, add package params docs

lornajane commented on a change in pull request #3244: Move parameter docs to separate page, add package params docs
URL: https://github.com/apache/incubator-openwhisk/pull/3244#discussion_r166733807
 
 

 ##########
 File path: docs/actions.md
 ##########
 @@ -422,20 +280,27 @@ This example invokes a Yahoo Weather service to get the current conditions at a
 
   This example also shows the need for asynchronous actions. The action returns a Promise to indicate that the result of this action is not available yet when the function returns. Instead, the result is available in the `request` callback after the HTTP call completes, and is passed as an argument to the `resolve()` function.
 
-2. Run the following commands to create the action and invoke it:
+2. Create an action from the `weather.js` file:
 
   ```
   wsk action create weather weather.js
   ```
+
+3. Use the following command to run the action, and observe the output:
   ```
   wsk action invoke --result weather --param location "Brooklyn, NY"
   ```
+
+  Using the `--result` flag means that the value returned from the action is shown as output on the commandline:
+
   ```json
   {
       "msg": "It is 28 degrees in Brooklyn, NY and Cloudy"
   }
   ```
 
+This example also passed a parameter to the action by using the `--param` flag and a value that can be changed each time the action is invoked. Find out more about parameters in the [Working with parameters](./parameters) section.
 
 Review comment:
   Oops!  Updated all the links.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services