import { getAppId, getDataApiPage, getHistoryDataPage, postAppId } from '@/api/iot/data'
import { message } from 'ant-design-vue'

export class DataController {
  static async pageHistory (params: IOT.API.DATA.QueryParams) {
    return await getHistoryDataPage(params)
  }

  static async pageOpenAPiList (params: {page: number, pageSize: number, apiLabel: string}) {
    return await getDataApiPage(params)
  }

  static async getAppId () {
    return await getAppId()
  }

  static async postAppId (data: {appId: string}) {
    await postAppId(data)
    message.success('创建Appid成功')
  }
}
