import BaseAPI from './BaseAPI' ; class UsergroupsUsers extends BaseAPI { public list ( usergroup , include_disabled = null , extraArgs = { } ) { const args = { usergroup , include_disabled , ... extraArgs } ; return this . _get ( 'usergroups.users.list' , args ) ; } public update ( usergroup , users , include_count = null , extraArgs = { } ) { const args = { usergroup , users , include_count , ... extraArgs } ; return this . _post ( 'usergroups.users.update' , args ) ; } } export default class UserGroups extends BaseAPI { public users ; constructor ( token , retries_limit ) { super ( token , retries_limit ) ; this . users = new UsergroupsUsers ( token , retries_limit ) ; } public create ( name , channels = null , description = null , handle = null , include_disabled = null , extraArgs = { } ) { const args = { name , channels , description , handle , include_disabled , ... extraArgs } ; return this . _post ( 'usergroups.create' , args ) ; } public disable ( usergroup , include_count = null , extraArgs = { } ) { const args = { usergroup , include_count , ... extraArgs } ; return this . _post ( 'usergroups.disable' , args ) ; } public enable ( usergroup , include_count = null , extraArgs = { } ) { const args = { usergroup , include_count , ... extraArgs } ; return this . _post ( 'usergroups.enable' , args ) ; } public list ( usergroup , include_count = null , include_disabled = null , include_users = null , extraArgs = { } ) { const args = { usergroup , include_count , include_disabled , include_users , ... extraArgs } ; return this . _get ( 'usergroups.list' , args ) ; } public update ( usergroup , channels = null , description = null , handle = null , include_disabled = null , name = null , extraArgs = { } ) { const args = { usergroup , channels , description , handle , include_disabled , name , ... extraArgs } ; return this . _post ( 'usergroups.create' , args ) ; } }