aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/socket/socket-io-command.ts
blob: 545561bed9edf1eb4f287f85e4eb9044855c0e0e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { io } from 'socket.io-client'
import { AbstractCommand, OverrideCommandOptions } from '../shared'

export class SocketIOCommand extends AbstractCommand {

  getUserNotificationSocket (options: OverrideCommandOptions = {}) {
    return io(this.server.url + '/user-notifications', {
      query: { accessToken: this.server.accessToken }
    })
  }

  getLiveNotificationSocket () {
    return io(this.server.url + '/live-videos')
  }
}