diff --git a/docs/cheatsheet/web/index.html b/docs/cheatsheet/web/index.html index 0df1a94d..8e01155c 100644 --- a/docs/cheatsheet/web/index.html +++ b/docs/cheatsheet/web/index.html @@ -239,6 +239,43 @@

Catching event

event_handlers:
   events.socket name.email_sent:
     file: email-sent.js
+ +

Groups

+

Syncano groups

+

Import

+
const {groups} = new Syncano(ctx)
+

Groups management

+

+// Create group
+await groups.create(name, description)
+
+//Delete group
+await groups.delete(name)
+
+//Groups list
+await groups.list()
+
+//Get group with users list
+await groups.get(name)
+      
+

Users management in groups

+

+//Get group with users list
+await groups.get(name)
+
+//Get user groups
+await groups.user(userId)
+
+//Add user to group
+await groups.addUser(name, userId)
+
+//Remove user from group
+await groups.removeUser(name, userId)
+