@eluvio/elv-client-js 4.0.8 → 4.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ // List all access gropus visible to the current private key
2
+
3
+ const Utility = require("./lib/Utility");
4
+
5
+ const Client = require("./lib/concerns/Client");
6
+ const Logger = require("./lib/concerns/Logger");
7
+
8
+ class ListAccessGroups extends Utility {
9
+ blueprint() {
10
+ return {
11
+ concerns: [Logger, Client]
12
+ };
13
+ }
14
+
15
+ async body() {
16
+ const logger = this.logger;
17
+ const libList = await this.concerns.Library.list();
18
+ logger.data("libraries", libList);
19
+
20
+ logger.logList(libList);
21
+ if(libList.length === 0) logger.warn("No visible libraries found using supplied private key.");
22
+ }
23
+
24
+ header() {
25
+ return "Get list of access groups";
26
+ }
27
+
28
+ }
29
+
30
+ if(require.main === module) {
31
+ Utility.cmdLineInvoke(ListAccessGroups);
32
+ } else {
33
+ module.exports = ListAccessGroups;
34
+ }