Documentation ¶
Index ¶
Constants ¶
View Source
const DeviceListPageSize = 50
View Source
const PageListPageSize = 50
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceListResult ¶
type DeviceListResult struct { PageIndex int `json:"page_index"` Date int64 `json:"date"` TotalCount int `json:"total_count"` ItemCount int `json:"item_count"` Data struct { DeviceStatisticsList []DeviceStatistics `json:"devices"` } `json:"data"` }
func DeviceList ¶
批量查询设备统计数据接口
type DeviceStatistics ¶
type DeviceStatistics struct { device.DeviceBase StatisticsBase }
type DeviceStatisticsIterator ¶
type DeviceStatisticsIterator struct {
// contains filtered or unexported fields
}
DeviceStatisticsIterator
iter, err := NewDeviceStatisticsIterator(clt, date, pageIndex) if err != nil { // TODO: 增加你的代码 } for iter.HasNext() { items, err := iter.NextPage() if err != nil { // TODO: 增加你的代码 } // TODO: 增加你的代码 }
func (*DeviceStatisticsIterator) HasNext ¶
func (iter *DeviceStatisticsIterator) HasNext() bool
func (*DeviceStatisticsIterator) NextPage ¶
func (iter *DeviceStatisticsIterator) NextPage() (statisticsList []DeviceStatistics, err error)
func (*DeviceStatisticsIterator) TotalCount ¶
func (iter *DeviceStatisticsIterator) TotalCount() int
type PageListResult ¶
type PageListResult struct { PageIndex int `json:"page_index"` Date int64 `json:"date"` TotalCount int `json:"total_count"` ItemCount int `json:"item_count"` Data struct { PageStatisticsList []PageStatistics `json:"pages"` } `json:"data"` }
type PageStatistics ¶
type PageStatistics struct { PageId int64 `json:"page_id"` StatisticsBase }
type PageStatisticsIterator ¶
type PageStatisticsIterator struct {
// contains filtered or unexported fields
}
PageStatisticsIterator
iter, err := NewPageStatisticsIterator(clt, date, pageIndex) if err != nil { // TODO: 增加你的代码 } for iter.HasNext() { items, err := iter.NextPage() if err != nil { // TODO: 增加你的代码 } // TODO: 增加你的代码 }
func (*PageStatisticsIterator) HasNext ¶
func (iter *PageStatisticsIterator) HasNext() bool
func (*PageStatisticsIterator) NextPage ¶
func (iter *PageStatisticsIterator) NextPage() (statisticsList []PageStatistics, err error)
func (*PageStatisticsIterator) TotalCount ¶
func (iter *PageStatisticsIterator) TotalCount() int
type StatisticsBase ¶
type StatisticsBase struct { Ftime int64 `json:"ftime"` // 当天0点对应的时间戳 ClickPV int `json:"click_pv"` // 点击摇周边消息的次数 ClickUV int `json:"click_uv"` // 点击摇周边消息的人数 ShakePV int `json:"shake_pv"` // 摇周边的次数 ShakeUV int `json:"shake_uv"` // 摇周边的人数 }
func Device ¶
func Device(clt *core.Client, deviceIdentifier *device.DeviceIdentifier, beginDate, endDate int64) (data []StatisticsBase, err error)
以设备为维度的数据统计接口
Click to show internal directories.
Click to hide internal directories.