import BaseAPI from './BaseAPI' ; export default class Channels extends BaseAPI { public archive ( channel , extraArgs ) { const args = { channel , ... extraArgs } ; return this . _post ( 'channels.archive' , args ) ; } public create ( name , validate = null , extraArgs ) { const args = { name , validate , ... extraArgs } ; return this . _get ( 'channels.create' , 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 ( 'channels.history' , args ) ; } public info ( channel , include_locale = false , extraArgs ) { const args = { channel , include_locale , ... extraArgs } ; return this . _get ( 'channels.info' , args ) ; } public invite ( channel , user , extraArgs ) { const args = { channel , user , ... extraArgs } ; return this . _post ( 'channels.invite' , args ) ; } public join ( name , validate = null , extraArgs ) { const args = { name , validate , ... extraArgs } ; return this . _post ( 'channels.join' , args ) ; } public kick ( channel , user , extraArgs ) { const args = { channel , user , ... extraArgs } ; return this . _post ( 'channels.kick' , args ) ; } public leave ( channel , extraArgs ) { const args = { channel , ... extraArgs } ; return this . _post ( 'channels.leave' , args ) ; } public list ( cursor = null , exclude_archived = false , exclude_members = false , limit = 0 , extraArgs ) { const args = { cursor , exclude_archived , exclude_members , limit , ... extraArgs } ; return this . _get ( 'channels.list' , args ) ; } public mark ( channel , ts , extraArgs ) { const args = { channel , ts , ... extraArgs } ; return this . _post ( 'channels.mark' , args ) ; } public rename ( channel , name , validate = null , extraArgs ) { const args = { channel , name , validate , ... extraArgs } ; return this . _get ( 'channels.rename' , args ) ; } public replies ( channel , thread_ts , extraArgs ) { const args = { channel , thread_ts , ... extraArgs } ; return this . _get ( 'channels.replies' , args ) ; } public setPurpose ( channel , purpose , extraArgs ) { const args = { channel , purpose , ... extraArgs } ; return this . _post ( 'channels.setPurpose' , args ) ; } public setTopic ( channel , topic , extraArgs ) { const args = { channel , topic , ... extraArgs } ; return this . _post ( 'channels.setTopic' , args ) ; } public unarchive ( channel , extraArgs ) { const args = { channel , ... extraArgs } ; return this . _post ( 'channels.unarchive' , args ) ; } }