import {
    service
  } from "./request";

// 获取红包任务详情
export function getPostDetail(params) {
    return service({
      url: `/post/getDetail`,
      method: 'post',
      data: params
    })
}


// 领取红包任务
export function getRedPacket(params) {
  return service({
    url: '/post/luckdrop/receiveLuckdrop',
    method: 'post',
    data: params
  })
  // axios.post('https://denettestapi.piaoquantv.com/denet/post/luckdrop/receiveLuckdrop')
}

// 完成红包任务
export function finishRedPacket(params) {
  return service({
    url: `/post/luckdrop/finishLuckdrop`,
    method: 'post',
    data: params
  })
}

// 一键点赞
export function oneKeyLike(params) {
  return service({
    url: `/openapi/favoriteTweet`,
    method: 'post',
    data: params
  })
}

// 一键转推
export function oneKeyReTweet(params) {
  return service({
    url: `/openapi/retweet`,
    method: 'post',
    data: params
  })
}

// 一键关注
export function oneKeyFollow(params) {
  return service({
    url: `/openapi/followTwitterUser`,
    method: 'post',
    data: params
  })
}

export function getTaskDetail(params){
  return service({
    url: `/post/luckdrop/getFinishConditionsDetail`,
    method: 'post',
    data: params
  }) 
}


export function getReceivedList(params){
  return service({
    url: `/post/luckdrop/getReceivedList`,
    method: 'post',
    data: params
  }) 
}

export function terminatedLuckdrop(params){
  return service({
    url: `/post/luckdrop/terminatedLuckdrop`,
    method: 'post',
    data: params
  }) 
}


// 上报红包任务完成事件
// 1 Twitter follow Twitter ScreenName
// 2 Tweet like
// 3 Retweet
export function addFinishEvent(params){
  return service({
    url: `/post/luckdrop/addFinishEvent`,
    method: 'post',
    data: params
  })
}