Examples of VideoServiceInterface


Examples of com.google.api.ads.adwords.axis.v201402.video.VideoServiceInterface

  public static void runExample(AdWordsServices adWordsServices,
      AdWordsSession session, String query)
      throws Exception {

    // Get the VideoCampaignService.
    VideoServiceInterface videoService = adWordsServices.get(session, VideoServiceInterface.class);

    // Create a selector.
    VideoSearchSelector selector = new VideoSearchSelector();
    selector.setSearchType(VideoSearchSelectorSearchType.VIDEO);
    selector.setQuery(query);
    selector.setPaging(new Paging(0, PAGE_SIZE));

    // Run the query.
    VideoSearchPage page = videoService.search(selector);

    // Display videos.
    if (page.getTotalNumEntries() > 0) {
      for (YouTubeVideo video : page.getEntries()) {
        System.out.printf("YouTube video id %s with title '%s' found.%n",
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.video.VideoServiceInterface

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, String videoId)
          throws Exception {
    // Get the VideoService.
    VideoServiceInterface videoService =
        adWordsServices.get(session, VideoServiceInterface.class);

    // Create the call to action.
    VideoCallToAction videoCallToAction = new VideoCallToAction();
    videoCallToAction.setId(videoId);
   
    CallToAction callToAction = new CallToAction();
    CallToActionCreative callToActionCreative = new CallToActionCreative();
    callToActionCreative.setHeadline("Mars cruise");
    callToActionCreative.setDescriptionLine1("Astonishing views");
    callToActionCreative.setDescriptionLine2("Mild climate");
    callToActionCreative.setDisplayUrl("www.example.com/mars");
    callToActionCreative.setDestinationUrl("www.example.com/mars");
    callToAction.setCreative(callToActionCreative);
    videoCallToAction.setCallToAction(callToAction);

    VideoCallToActionOperation operation = new VideoCallToActionOperation();
    operation.setOperand(videoCallToAction);
   
    // Use SET to add a new Call to Action, or to overwrite an existing one.
    operation.setOperator(Operator.SET);

    VideoCallToActionOperation[] operations = new VideoCallToActionOperation[] {operation};

    // Add video call to action.
    VideoReturnValue result = videoService.mutateCallToAction(operations);

    for (YouTubeVideo youTubeVideoResult : result.getValue()) {
      System.out.printf("CallToAction overlay was added to video ID %s, "
          + "headline '%s'.%n",
          youTubeVideoResult.getId(),
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201406.video.VideoServiceInterface

  public static void runExample(AdWordsServices adWordsServices,
      AdWordsSession session, String query)
      throws Exception {

    // Get the VideoCampaignService.
    VideoServiceInterface videoService = adWordsServices.get(session, VideoServiceInterface.class);

    // Create a selector.
    VideoSearchSelector selector = new VideoSearchSelector();
    selector.setSearchType(VideoSearchSelectorSearchType.VIDEO);
    selector.setQuery(query);
    selector.setPaging(new Paging(0, PAGE_SIZE));

    // Run the query.
    VideoSearchPage page = videoService.search(selector);

    // Display videos.
    if (page.getTotalNumEntries() > 0) {
      for (YouTubeVideo video : page.getEntries()) {
        System.out.printf("YouTube video id %s with title '%s' found.%n",
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201406.video.VideoServiceInterface

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, String videoId)
          throws Exception {
    // Get the VideoService.
    VideoServiceInterface videoService =
        adWordsServices.get(session, VideoServiceInterface.class);

    // Create the call to action.
    VideoCallToAction videoCallToAction = new VideoCallToAction();
    videoCallToAction.setId(videoId);
   
    CallToAction callToAction = new CallToAction();
    CallToActionCreative callToActionCreative = new CallToActionCreative();
    callToActionCreative.setHeadline("Mars cruise");
    callToActionCreative.setDisplayUrl("www.example.com/mars");
    callToActionCreative.setDestinationUrl("www.example.com/mars");
    callToAction.setCreative(callToActionCreative);
    videoCallToAction.setCallToAction(callToAction);

    VideoCallToActionOperation operation = new VideoCallToActionOperation();
    operation.setOperand(videoCallToAction);
   
    // Use SET to add a new Call to Action, or to overwrite an existing one.
    operation.setOperator(Operator.SET);

    VideoCallToActionOperation[] operations = new VideoCallToActionOperation[] {operation};

    // Add video call to action.
    VideoReturnValue result = videoService.mutateCallToAction(operations);

    for (YouTubeVideo youTubeVideoResult : result.getValue()) {
      System.out.printf("CallToAction overlay was added to video ID %s, "
          + "headline '%s'.%n",
          youTubeVideoResult.getId(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.