import{URL}from"../utils/config";import{request}from"./plv-request";const{mainHost:mainHost,routerHost:routerHost}=URL;export default{getOpenId:e=>request(mainHost+"/live/v3/applet/sdk/onlogin-sdk",{qs:{code:e}}),getUserId:e=>request(mainHost+"/live/v3/applet/sdk/get-chat-userId",{qs:{openId:e}}),getChannelDetail:e=>request(mainHost+"/live/v3/applet/sdk/get-channel-token-detail",{qs:{channelId:e}}),getOrdinaryLiveStatus:e=>request(mainHost+"/live_status/query",{qs:{stream:e}},!0),getPlayBackVideos:(e={})=>(e=Object.assign(e,{pageSize:500,page:1}),request(mainHost+"/live/v3/channel/playback/list-actual-playback",{qs:e})),getChannelKey:e=>request(`${mainHost}/live/v2/channels/${e}/mic-auth`,{qs:{type:"web",timestamp:(new Date).getTime()}},!0),agoraRelation(e){let t={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"};return request(`${mainHost}/live/v3/agora/relation`,{body:e,method:"POST",headers:t})},getTRTCChannelKey:async e=>request(`${mainHost}/live/inner/v3/trtc/auth`,{qs:e},!0),getChapterRecords:e=>request(`${mainHost}/live/v3/channel/chat/get-ppt-records`,{qs:e}),getRestrict:e=>request(`${routerHost}/livejson.polyv.net/service/v3/restrict.json`,{qs:e},!0),getBackRestrict:e=>request(`${routerHost}/live.polyv.net/service/v3/restrict.json`,{qs:e},!0),getLatestSessionId:e=>request(`${mainHost}/live/channel-sessionid/query`,{qs:e})};