import BaseAPI from './BaseAPI' ; export default class IM extends BaseAPI { public close ( channel , extraArgs = { } ) { const args = { channel , ... extraArgs } ; return this . _post ( 'im.close' , args ) ; } public history ( channel , count = 100 , inclusive = '0' , latest = 'now' , oldest = 0 , extraArgs = { } ) { const args = { channel , count , inclusive , latest , oldest , ... extraArgs } ; return this . _get ( 'im.history' , args ) ; } public list ( cursor = null , limit = null , extraArgs = { } ) { const args = { cursor , limit , ... extraArgs } ; return this . _get ( 'im.list' , args ) ; } public mark ( channel , ts , extraArgs = { } ) { const args = { channel , ts , ... extraArgs } ; return this . _post ( 'im.mark' , args ) ; } public open ( channel , user , include_locale = false , return_im = null , extraArgs = { } ) { const args = { channel , user , include_locale , return_im , ... extraArgs } ; return this . _post ( 'im.mark' , args ) ; } public replies ( channel , thread_ts , extraArgs = { } ) { const args = { channel , thread_ts , ... extraArgs } ; return this . _get ( 'im.replies' , args ) ; } }