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 data.event video_event | courseware_event | lesson_plan_event | file_event | suggestion_event | paper_event
 * @param data.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.data
 */

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