def DescribeIpVisit(self, request): """DescribeIpVisit 用于查询 5 分钟活跃用户数,及日活跃用户数明细 + 5 分钟活跃用户数:根据日志中客户端 IP,5 分钟粒度去重统计 + 日活跃用户数:根据日志中客户端 IP,按天粒度去重统计 :param request: Request instance for DescribeIpVisit. :type request: :class:`tencentcloud.cdn.v20180606.models.DescribeIpVisitRequest` :rtype: :class:`tencentcloud.cdn.v20180606.models.DescribeIpVisitResponse` """ try: params = request._serialize() body = self.call("DescribeIpVisit", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.DescribeIpVisitResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)
def DescribeIpVisit(self, request): """This API (DescribeIpVisit) is used to query the number of users who remain active for 5 minutes and the detailed number of daily active users. + Number of users who remain active for 5 minutes: Collects deduplicated statistics based on client IP addresses in the log with the 5-minute granularity. + Number of daily active users: Collects deduplicated statistics based on client IP addresses in the log with the 1-day granularity. :param request: Request instance for DescribeIpVisit. :type request: :class:`tencentcloud.cdn.v20180606.models.DescribeIpVisitRequest` :rtype: :class:`tencentcloud.cdn.v20180606.models.DescribeIpVisitResponse` """ try: params = request._serialize() body = self.call("DescribeIpVisit", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.DescribeIpVisitResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)