获取App新增用户数
com.umeng.uapp:umeng.uapp.getNewUsers-1
系统级输入参数|应用级输入参数|返回结果|示例|错误码|API工具
获取指定App某个时间范围内的新增用户数
系统级输入参数
名称 | 类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
_aop_signature | String | 是 | 请求签名 | -- |
_aop_timestamp | String | 否 | 请求时间戳 | -- |
应用级输入参数
名称 | 类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
appkey | String | 是 | 应用ID | -- |
startDate | String | 是 | 查询起始日期 | 2018-01-01 |
endDate | String | 是 | 查询截止日期 | 2018-01-02 |
periodType | String | 否 | 查询类型(按日daily,按周weekly,按月monthly 查询) | daily |
返回结果
名称 | 类型 | 描述 | 示例值 |
---|---|---|---|
newUserInfo | umeng.uapp.count.Data[] | umeng.uapp.count.Data[] | -- |
请求示例
# -*- coding: utf-8 -*-
#!/usr/bin/env python
import aop
import aop.api
import json
# 设置网关域名
aop.set_default_server('gateway.open.umeng.com')
# 设置apiKey和apiSecurity
aop.set_default_appinfo(12344, "xxxxxxxxxx")
# 构造Request和访问协议是否是https
req = aop.api.UmengUappGetNewUsersRequest()
# 发起Api请求
try:
resp = req.get_response(None, appkey="", startDate="2018-01-01", endDate="2018-01-02", periodType="daily")
print(resp)
except aop.ApiError as e:
# Api网关返回的异常
print(e)
except aop.AopError as e:
# 客户端Api网关请求前的异常
print(e)
except Exception as e:
# 其它未知异常
print(e)
响应示例
{
"newUserInfo":[
{
"date":"2018-01-01",
"dailyValue":[
{
"name":"xxx",
"value":0
}
],
"hourValue":"",
"value":0
}
]
}
异常示例
{
"error_message":"Illegal argument xxx : expect [type: Long] but [type: java.lang.String]",
"error_code":"gw.ParamIllegal",
"request_id":"0ba0f599jdy76m43-18"
}