import BaseAPI from './BaseAPI' ; export default class Conversations extends BaseAPI { public archive ( channel , extraArgs = { } ) { const args = { channel , ... extraArgs } ; return this . _post ( 'conversations.archive' , args ) ; } public close ( channel , extraArgs = { } ) { const args = { channel , ... extraArgs } ; return this . _get ( 'conversations.close' , args ) ; } public create ( name , is_private = null , user_ids = null , extraArgs = { } ) { const args = { name , is_private , user_ids , ... extraArgs } ; return this . _get ( 'conversations.create' , args ) ; } public history ( channel , inclusive = null , latest = 'now' , limit = 10 , oldest = 0 , extraArgs = { } ) { const args = { channel , inclusive , latest , limit , oldest , ... extraArgs } ; return this . _get ( 'conversations.history' , args ) ; } public info ( channel , include_locale = false , extraArgs = { } ) { const args = { channel , include_locale , ... extraArgs } ; return this . _get ( 'conversations.info' , args ) ; } public invite ( channel , user , extraArgs = { } ) { const args = { channel , user , ... extraArgs } ; return this . _post ( 'conversations.invite' , args ) ; } public join ( name , extraArgs = { } ) { const args = { name , ... extraArgs } ; return this . _post ( 'conversations.join' , args ) ; } public kick ( channel , user , extraArgs = { } ) { const args = { channel , user , ... extraArgs } ; return this . _post ( 'conversations.kick' , args ) ; } public leave ( channel , extraArgs = { } ) { const args = { channel , ... extraArgs } ; return this . _post ( 'conversations.leave' , args ) ; } public list ( cursor = null , exclude_archived = false , limit = 100 , types = 'public_channel' , extraArgs = { } ) { const args = { cursor , exclude_archived , limit , types , ... extraArgs } ; return this . _get ( 'conversations.list' , args ) ; } public member ( channel , cursor = null , limit = 100 , extraArgs = { } ) { const args = { channel , cursor , limit , ... extraArgs } ; return this . _post ( 'conversations.member' , args ) ; } public open ( channel = null , return_im = null , users = null , extraArgs = { } ) { const args = { channel , return_im , users , ... extraArgs } ; return this . _post ( 'conversations.open' , args ) ; } public rename ( channel , name , extraArgs = { } ) { const args = { channel , name , ... extraArgs } ; return this . _post ( 'conversations.rename' , args ) ; } public replies ( channel , ts , cursor = null , inclusive = null , latest = 'now' , limit = 10 , oldest = 0 , extraArgs = { } ) { const args = { channel , ts , cursor , inclusive , latest , limit , oldest , ... extraArgs } ; return this . _get ( 'conversations.replies' , args ) ; } public setPurpose ( channel , purpose , extraArgs = { } ) { const args = { channel , purpose , ... extraArgs } ; return this . _post ( 'conversations.setPurpose' , args ) ; } public setTopic ( channel , topic , extraArgs = { } ) { const args = { channel , topic , ... extraArgs } ; return this . _post ( 'conversations.setTopic' , args ) ; } public unarchive ( channel , extraArgs = { } ) { const args = { channel , ... extraArgs } ; return this . _post ( 'conversations.unarchive' , args ) ; } }