import request from '@/utils/request'


/**
 * 分页查询设备
 */
export function getDevices(params) {
    return request.get('/v2/api/device', { params })
}

/**
 * 分页查询视频
 */
export function getVideo(params) {
    return request.get('/v2/api/video', { params })
}


/**
 * 取消绑定设备
 */
export function unBindDevice(id) {
    return request.put(`/v2/api/device/${id}/un-bind`)
}

/**
 * 绑定设备
 */
export function bindDevices(id,params) {
    return request.put(`/v2/api/device/${id}/bind?user_id=`+params)
}

/**
 * 查询视频详情
 */
export function getVideoDetail(id) {
    return request.get(`/v2/api/video/${id}`)
}

export function updateVideo(params) {
    return request.put(`/v2/api/video`, params)
}