Skip to content

shfc/umeng-openapi-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

umeng-openapi-sdk

umeng-openapi-sdk 是友盟+ Open API的golang版本

功能实现

如何使用

var (
	apiKey      = "your api key"
	apiSecurity = "your api security"
	appKey      = "your app key"
)

func main() {
	uAppCli := uapp.NewUAppClient(apiKey, apiSecurity)
	
	// 获取当前用户所有App昨日和今日的基础统计数据
	allAppDataResp, err := uAppCli.GetAllAppData()
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Printf("%+v\n",allAppDataResp)
	
	// 获取新增账号
	newAccountsResp, err := uAppCli.GetNewAccounts(appKey, "2020-05-01", "2020-05-11", "daily", "")
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Printf("%+v\n",newAccountsResp)
}