statistics

package
v0.0.0-...-527ea11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

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

func DeviceList(clt *mp.Client, date int64, pageIndex int) (rslt *DeviceListResult, err error)

批量查询设备统计数据接口

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 NewDeviceStatisticsIterator

func NewDeviceStatisticsIterator(clt *mp.Client, date int64, pageIndex int) (iter *DeviceStatisticsIterator, err error)

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"`
}

func PageList

func PageList(clt *mp.Client, date int64, pageIndex int) (rslt *PageListResult, err error)

批量查询设备统计数据接口

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 NewPageStatisticsIterator

func NewPageStatisticsIterator(clt *mp.Client, date int64, pageIndex int) (iter *PageStatisticsIterator, err error)

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 *mp.Client, deviceIdentifier *device.DeviceIdentifier, beginDate, endDate int64) (data []StatisticsBase, err error)

以设备为维度的数据统计接口

func Page

func Page(clt *mp.Client, pageId, beginDate, endDate int64) (data []StatisticsBase, err error)

以页面为维度的数据统计接口

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL