Exemple #1
0
 def create_group(self, name, text):
     data = {
         'name': name,
         'text': text
     }
     r = self.http.post('/group', data)
     return Group.parse(r['group'])
Exemple #2
0
 def update_group(self, id, **kwargs):
     data = {
         'name': kwargs.get('name'),
         'text': kwargs.get('text')
     }
     r = self.http.put('/group/{}'.format(id), data)
     return Group.parse(r['group'])
Exemple #3
0
 def create_group(self, name, text):
     data = {
         'name': name,
         'text': text
     }
     r = self.http.post('/group', data)
     return Group.parse(r['group'])
Exemple #4
0
 def get_users_groups(self, query=None):
     r = self.http.get('/groups', query)
     return [Group.parse(g) for g in r['groups']]
Exemple #5
0
 def get_group(self):
     return Group.parse(self.http.get('/group/%s' % id)['group'])
Exemple #6
0
 def get_user_groups(self, id):
     r = self.http.get('/user/{}/groups'.format(id))
     return [Group.parse(g) for g in r['groups']]
Exemple #7
0
 def get_users_groups(self, query=None):
     r = self.http.get('/groups', query)
     return [Group.parse(g) for g in r['groups']]
Exemple #8
0
 def get_group(self):
     return Group.parse(self.http.get('/group/%s' % id)['group'])
Exemple #9
0
 def get_user_groups(self, id):
     r = self.http.get('/user/{}/groups'.format(id))
     return [Group.parse(g) for g in r['groups']]
Exemple #10
0
 def get_user_groups(self, id):
     r = self.http.get(f'/user/{id}/groups')
     return [Group.parse(g) for g in r['groups']]