Package com.google.api.ads.adwords.awreporting.exporter.reportwriter

Examples of com.google.api.ads.adwords.awreporting.exporter.reportwriter.GoogleDriveReportWriter


        }

        // Writing HTML to GoogleDrive
        if (writeHtml) {
          LOGGER.debug("Writing (to GoogleDrive) HTML for account: " + accountId);
          GoogleDriveReportWriter gdrwHtml = new GoogleDriveReportWriter.GoogleDriveReportWriterBuilder(
              accountId, dateStart, dateEnd, mccAccountId, credential, ReportFileType.HTML,
              templateName)
            .withFolderPerAccount(perAccountFolder)
            .build();
          gdrwHtml.write(mrwHtml.getAsSource());
        }

        // Writing PDF to GoogleDrive
        if (writePdf) {
          LOGGER.debug("Writing (to GoogleDrive) PDF for account: " + accountId);
          GoogleDriveReportWriter gdrwPdf = new GoogleDriveReportWriter.GoogleDriveReportWriterBuilder(
              accountId, dateStart, dateEnd, mccAccountId, credential, ReportFileType.PDF,
              templateName)
            .withFolderPerAccount(perAccountFolder)
            .build();
          HTMLExporter.exportHtmlToPdf(mrwHtml.getAsSource(), gdrwPdf, fontPaths);
        }
       
        // Writing Drive Doc to GoogleDrive
        if (writeDriveDoc) {
          LOGGER.debug("Writing GoogleDrive Doc for account: " + accountId);
          GoogleDriveReportWriter gdrwDriveDoc = new GoogleDriveReportWriter.GoogleDriveReportWriterBuilder(
              accountId, dateStart, dateEnd, mccAccountId, credential, ReportFileType.DRIVE_DOC,
              templateName)
            .withFolderPerAccount(perAccountFolder)
            .build();
          gdrwDriveDoc.write(mrwHtml.getAsSource());
        }

      } else {

        // Writing HTML to Disk
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.awreporting.exporter.reportwriter.GoogleDriveReportWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.