starpit commented on a change in pull request #95: Sugar namespsace get.
URL: 
https://github.com/apache/incubator-openwhisk-client-js/pull/95#discussion_r160841850
 
 

 ##########
 File path: lib/namespaces.js
 ##########
 @@ -7,22 +7,22 @@ const BaseOperation = require('./base_operation')
 
 class Namespaces extends BaseOperation {
   list () {
-    return this.client.request('GET', `namespaces`)
+    return this.client.request('GET', 'namespaces')
   }
 
-  get (options) {
-    if (typeof options === 'string') {
-      return this.client.request('GET', `namespaces/${options}`)
-    }
-
-    options = options || {}
-    const id = options.name || options.namespace
-
-    if (!id) {
-      throw new Error('Missing mandatory parameter: id or namespace.')
-    }
-
-    return this.client.request('GET', `namespaces/${id}`)
+  get () {
+    let actions = this.client.request('GET', 'namespaces/_/actions')
+    let packages = this.client.request('GET', 'namespaces/_/packages')
+    let triggers = this.client.request('GET', 'namespaces/_/triggers')
+    let rules = this.client.request('GET', 'namespaces/_/rules')
+    return Promise
+      .all([pactions, packages, triggers, rules])
 
 Review comment:
   what is `pactions`?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to