import BaseAPI from './BaseAPI' ; export default class Groups extends BaseAPI { public archive ( channel , extraArgs = { } ) { const args = { channel , ... extraArgs } ; return this . _post ( 'groups.archive' , args ) ; } public create ( name , validate = null , extraArgs = { } ) { const args = { name , validate , ... extraArgs } ; return this . _get ( 'groups.create' , args ) ; } public createChild ( channel , count = 100 , inclusive = '0' , latest = 'now' , oldest = 0 , unreads = '0' , extraArgs = { } ) { const args = { channel , count , inclusive , latest , oldest , unreads , ... extraArgs } ; return this . _get ( 'groups.createChild' , args ) ; } public history ( channel , count = 100 , inclusive = '0' , latest = 'now' , oldest = 0 , unreads = '0' , extraArgs = { } ) { const args = { channel , count , inclusive , latest , oldest , unreads , ... extraArgs } ; return this . _get ( 'groups.history' , args ) ; } public info ( channel , include_locale = false , extraArgs = { } ) { const args = { channel , include_locale , ... extraArgs } ; return this . _get ( 'groups.info' , args ) ; } public invite ( channel , user , extraArgs = { } ) { const args = { channel , user , ... extraArgs } ; return this . _post ( 'groups.invite' , args ) ; } public kick ( channel , user , extraArgs = { } ) { const args = { channel , user , ... extraArgs } ; return this . _post ( 'groups.kick' , args ) ; } public leave ( channel , extraArgs = { } ) { const args = { channel , ... extraArgs } ; return this . _post ( 'groups.leave' , args ) ; } public list ( options = { } , cursor = null , exclude_archived = '0' , exclude_members = false , limit = 0 , extraArgs = { } ) { const args = { cursor , exclude_archived , exclude_members , limit , ... extraArgs } ; return this . _get ( 'groups.list' , args ) ; } public mark ( channel , ts , extraArgs = { } ) { const args = { channel , ts , ... extraArgs } ; return this . _post ( 'groups.mark' , args ) ; } public open ( channel , extraArgs = { } ) { const args = { channel , ... extraArgs } ; return this . _post ( 'groups.mark' , args ) ; } public rename ( channel , name , validate = null , extraArgs = { } ) { const args = { channel , name , validate , ... extraArgs } ; return this . _get ( 'groups.rename' , args ) ; } public replies ( channel , thread_ts , extraArgs = { } ) { const args = { channel , thread_ts , ... extraArgs } ; return this . _get ( 'groups.replies' , args ) ; } public setPurpose ( channel , purpose , extraArgs = { } ) { const args = { channel , purpose , ... extraArgs } ; return this . _post ( 'groups.setPurpose' , args ) ; } public setTopic ( channel , topic , extraArgs = { } ) { const args = { channel , topic , ... extraArgs } ; return this . _post ( 'groups.setTopic' , args ) ; } public unarchive ( channel , extraArgs = { } ) { const args = { channel , ... extraArgs } ; return this . _post ( 'groups.unarchive' , args ) ; } }