Package com.google.api.adwords.lib.utils.v201309

Examples of com.google.api.adwords.lib.utils.v201309.ReportDownloadResponse


      String query =
          "SELECT AdGroupId, Id, KeywordText, KeywordMatchType, Impressions, Clicks, Cost "
          + "FROM KEYWORDS_PERFORMANCE_REPORT WHERE Impressions > 0 DURING YESTERDAY";

      FileOutputStream fos = new FileOutputStream(new File(reportFile));
      ReportDownloadResponse response =
          ReportUtils.downloadReport(user, query, DownloadFormat.CSV, fos);
      if (response.getHttpStatus() == HttpURLConnection.HTTP_OK) {
        System.out.println("Report successfully downloaded: " + reportFile);
      } else {
        System.out.println("Report was not downloaded. " + response.getHttpStatus() + ": "
            + response.getHttpResponseMessage());
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here


      reportDefinition.setDownloadFormat(DownloadFormat.CSV);
      reportDefinition.setIncludeZeroImpressions(false);
      reportDefinition.setSelector(selector);

      FileOutputStream fos = new FileOutputStream(new File(reportFile));
      ReportDownloadResponse response = ReportUtils.downloadReport(user, reportDefinition, fos);
      if (response.getHttpStatus() == HttpURLConnection.HTTP_OK) {
        System.out.println("Report successfully downloaded: " + reportFile);
      } else {
        System.out.println("Report was not downloaded. " + response.getHttpStatus() + ": "
            + response.getHttpResponseMessage());
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

      String query =
          "SELECT AdGroupId, Id, KeywordText, KeywordMatchType, Impressions, Clicks, Cost "
          + "FROM KEYWORDS_PERFORMANCE_REPORT WHERE Impressions > 0 DURING YESTERDAY";

      FileOutputStream fos = new FileOutputStream(new File(reportFile));
      ReportDownloadResponse response =
          ReportUtils.downloadReport(user, query, DownloadFormat.CSV, fos);
      if (response.getHttpStatus() == HttpURLConnection.HTTP_OK) {
        System.out.println("Report successfully downloaded: " + reportFile);
      } else {
        System.out.println("Report was not downloaded. " + response.getHttpStatus() + ": "
            + response.getHttpResponseMessage());
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

      reportDefinition.setDownloadFormat(DownloadFormat.CSV);
      reportDefinition.setIncludeZeroImpressions(false);
      reportDefinition.setSelector(selector);

      FileOutputStream fos = new FileOutputStream(new File(reportFile));
      ReportDownloadResponse response = ReportUtils.downloadReport(user, reportDefinition, fos);
      if (response.getHttpStatus() == HttpURLConnection.HTTP_OK) {
        System.out.println("Report successfully downloaded: " + reportFile);
      } else {
        System.out.println("Report was not downloaded. " + response.getHttpStatus() + ": "
            + response.getHttpResponseMessage());
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of com.google.api.adwords.lib.utils.v201309.ReportDownloadResponse

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.