Example #1
0
        public int GetReportState(string reportId)
        {
            int i = -1;

            resHeader = service.getReportState(header, reportId, out i);
            return(i);
        }
Example #2
0
 public BaiduV2ReportService(string userName, string passWord, string toKen)
 {
     service         = new BaiduAPI_V2_ReportService.ReportServiceClient();
     header          = new BaiduAPI_V2_ReportService.AuthHeader();
     resHeader       = new BaiduAPI_V2_ReportService.ResHeader();
     header.username = userName;
     header.password = passWord;
     header.token    = toKen;
 }
Example #3
0
        public FilePathInfo GetReportFileUrl(string reportId)
        {
            string reportFilePath = null;

            resHeader = service.getReportFileUrl(header, reportId, out reportFilePath);
            FilePathInfo fpi = new FilePathInfo();

            fpi.FilePath = reportFilePath;
            fpi.FileName = FileHelper.GetFileNameFromUrlForStatistics(reportFilePath) + ".txt";
            return(fpi);
        }
Example #4
0
        public string GetProfessionalReportId(string[] performanceData, int reportType, int levelOfDetails, int statRange, DateTime startDate, DateTime endDate)
        {
            BaiduAPI_V2_ReportService.ReportRequestType requestType = new BaiduAPI_V2_ReportService.ReportRequestType();
            requestType.performanceData = performanceData;
            requestType.startDate       = Convert.ToDateTime(startDate.ToString("yyyy-MM-ddT00:00:00.000"));
            requestType.endDate         = Convert.ToDateTime(endDate.ToString("yyyy-MM-ddT23:59:59.000"));
            requestType.unitOfTime      = 5;
            requestType.format          = 1;
            requestType.platform        = 0;
            requestType.statIds         = null;
            requestType.attributes      = null;
            requestType.idOnly          = false;
            requestType.reportType      = reportType;
            requestType.levelOfDetails  = levelOfDetails;
            requestType.statRange       = statRange;

            string reportId = null;

            resHeader = service.getProfessionalReportId(header, requestType, out reportId);
            return(reportId);
        }