import httpRequest from '@/utils/axios'

// https://gitlab.ezijing.com/root/api-documents/-/tree/master/%E6%95%B0%E6%8D%AE%E5%9F%8B%E7%82%B9%E6%9C%8D%E5%8A%A1/api

// 获取Key
export function getPageKey() {
  return httpRequest.get('/api/meta/api/v1/client/page-key')
}

/**
 *
 * @param event video_event | courseware_event | lesson_plan_event | file_event | suggestion_event | paper_event
 * @param action stu_watch_action | stu_watch_courseware_action | stu_watch_lesson_plan_action | stu_download_file_action | stu_suggestion_action | stu_submit_paper_action
 * @param data
 */

export function setMetaInfo(data: { event: string; action: string; data: string }) {
  return httpRequest.post('/api/meta/api/v1/client/set-meta-info', data)
}
