import request from '@/utils/request'

// 查询我的api列表
export function listApi(query) {
  return request({
    url: '/market/api/list',
    method: 'get',
    params: query
  })
}

// 查询我的api详细
export function getApi(myId) {
  return request({
    url: '/market/api/' + myId,
    method: 'get'
  })
}

// 新增我的api
export function addApi(data) {
  return request({
    url: '/market/api',
    method: 'post',
    data: data
  })
}

// 修改我的api
export function updateApi(data) {
  return request({
    url: '/market/api',
    method: 'put',
    data: data
  })
}

// 删除我的api
export function delApi(myId) {
  return request({
    url: '/market/api/' + myId,
    method: 'delete'
  })
}
