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)
}