Package com.google.api.adwords.v201008.o

Examples of com.google.api.adwords.v201008.o.RelatedToKeywordSearchParameter


    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        new String[] {clientId}, ApiUsageType.UNIT_COUNT_FOR_CLIENTS);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNotNull(apiUsageInfo.getApiUsageRecords());
    assertEquals(clientId, apiUsageInfo.getApiUsageRecords()[0].getClientEmail());
    assertNotNull(apiUsageInfo.getApiUsageRecords()[0].getCost());
  }
View Full Code Here


    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        null, ApiUsageType.METHOD_COST);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
  }
View Full Code Here

  /**
   * Test getting API usage.
   */
  public void testGetApiUsage() throws Exception {
    // Create selector.
    InfoSelector selector = new InfoSelector();
    selector.setServiceName("CampaignService");
    selector.setMethodName("mutate");
    selector.setOperator(Operator.ADD);
    selector.setDateRange(new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today()));
    selector.setApiUsageType(ApiUsageType.UNIT_COUNT);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
View Full Code Here

  /**
   * Test getting monthly API usage limits.
   */
  public void testGetMonthlyLimits() throws Exception {
    // Create selector.
    InfoSelector selector = new InfoSelector();
    selector.setApiUsageType(ApiUsageType.UNIT_COUNT);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
View Full Code Here

   * Test getting a unit count for clients.
   */
  public void testGetntCountForClients() throws Exception {
    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        new String[] {clientId}, ApiUsageType.UNIT_COUNT_FOR_CLIENTS);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNotNull(apiUsageInfo.getApiUsageRecords());
View Full Code Here

   * Test getting the cost of a method.
   */
  public void testGetMethodCost() throws Exception {
    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        null, ApiUsageType.METHOD_COST);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
View Full Code Here

    AverageTargetedMonthlySearchesSearchParameter averageTargetedMonthlySearchesSearchParameter =
        new AverageTargetedMonthlySearchesSearchParameter();
    averageTargetedMonthlySearchesSearchParameter
        .setOperation(new LongComparisonOperation(1L, 50L));

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("election");
    keyword.setMatchType(KeywordMatchType.BROAD);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        averageTargetedMonthlySearchesSearchParameter, relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
View Full Code Here

    CompetitionSearchParameter competitionSearchParameter = new CompetitionSearchParameter();
    CompetitionSearchParameterLevel[] levels = {CompetitionSearchParameterLevel.MEDIUM,
        CompetitionSearchParameterLevel.HIGH};
    competitionSearchParameter.setLevels(levels);

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("election");
    keyword.setMatchType(KeywordMatchType.BROAD);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        competitionSearchParameter,relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
View Full Code Here

        new CountryTargetSearchParameter();
    CountryTarget[] targets = {new CountryTarget(null, null, "US"),
        new CountryTarget(null, null, "CN"), new CountryTarget(null, null, "JP")};
    countryTargetSearchParameter.setCountryTargets(targets);

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("election");
    keyword.setMatchType(KeywordMatchType.BROAD);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        countryTargetSearchParameter,relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
View Full Code Here

    KeywordMatchTypeSearchParameter keywordMatchTypeSearchParameter =
        new KeywordMatchTypeSearchParameter();
    keywordMatchTypeSearchParameter.setKeywordMatchTypes(new KeywordMatchType[] {
        KeywordMatchType.BROAD, KeywordMatchType.EXACT});

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword2 = new Keyword();
    keyword2.setText("dvd player");
    keyword2.setMatchType(KeywordMatchType.EXACT);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword2});

    selector.setSearchParameters(new SearchParameter[] {
        excludedKeywordSearchParameter, keywordMatchTypeSearchParameter,
        relatedToKeywordSearchParameter});
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v201008.o.RelatedToKeywordSearchParameter

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.