Package com.google.gdata.data.youtube

Examples of com.google.gdata.data.youtube.YouTubeMediaGroup.addCategory()


      YouTubeMediaGroup mg = newEntry.getOrCreateMediaGroup();

      mg.setTitle(new MediaTitle());
      mg.getTitle().setPlainTextContent(title);

      mg.addCategory(new MediaCategory(YouTubeNamespace.CATEGORY_SCHEME, assignment.getCategory()));

      mg.setKeywords(new MediaKeywords());

      List<String> tags = new ArrayList<String>();
      for (int i = 0; i < tagsArray.length(); i++) {
View Full Code Here


      String applicationNameTag = Util.CLIENT_ID_PREFIX + SystemProperty.applicationId.get();
      if (applicationNameTag.length() > 25) {
        applicationNameTag = applicationNameTag.substring(0, 24) + "!";
      }
      mg.addCategory(new MediaCategory(YouTubeNamespace.DEVELOPER_TAG_SCHEME, applicationNameTag));

      // Maximum size of a developer tag is 25 characters, and we prepend 2
      // characters.
      if (assignmentId.length() <= 23) {
        // Minimum size of a developer tag is 3 characters, so always append 2
View Full Code Here

        String assignmentIdTag = String.format("A-%s", assignmentId);

        // Use a developer tag to make it easy for developers to query for all
        // videos uploaded for
        // a given assignment.
        mg.addCategory(new MediaCategory(YouTubeNamespace.DEVELOPER_TAG_SCHEME, assignmentIdTag));
      } else {
        log.warning(String.format("Assignment id '%s' is longer than 25 characters, and can't be "
            + "used as a developer tag.", assignmentId));
      }
     
View Full Code Here

    YouTubeMediaGroup mg = newEntry.getOrCreateMediaGroup();

    mg.setTitle(new MediaTitle());
    mg.getTitle().setPlainTextContent(title);

    mg.addCategory(new MediaCategory(YouTubeNamespace.CATEGORY_SCHEME, "News"));
   
    String keyword = System.getProperty("com.google.tchotchke.Keyword");
    if (keyword != null && keyword.length() > 0) {
      mg.setKeywords(new MediaKeywords());
      mg.getKeywords().addKeyword(keyword);
View Full Code Here

        "\n\n" + description);
   
    String defaultDeveloperTag = System.getProperty(
        "com.google.tchotchke.DefaultDeveloperTag");
    if (defaultDeveloperTag != null && defaultDeveloperTag.length() > 0) {
      mg.addCategory(new MediaCategory(YouTubeNamespace.DEVELOPER_TAG_SCHEME,
          defaultDeveloperTag));
    }
   
    mg.addCategory(new MediaCategory(YouTubeNamespace.DEVELOPER_TAG_SCHEME,
        articleId));
View Full Code Here

    if (defaultDeveloperTag != null && defaultDeveloperTag.length() > 0) {
      mg.addCategory(new MediaCategory(YouTubeNamespace.DEVELOPER_TAG_SCHEME,
          defaultDeveloperTag));
    }
   
    mg.addCategory(new MediaCategory(YouTubeNamespace.DEVELOPER_TAG_SCHEME,
        articleId));

    YouTubeApiManager apiManager = new YouTubeApiManager();
    apiManager.setToken(sessionManager.getToken());
View Full Code Here

    VideoEntry newEntry = new VideoEntry();

    YouTubeMediaGroup mg = newEntry.getOrCreateMediaGroup();

    mg.addCategory(new MediaCategory(YouTubeNamespace.CATEGORY_SCHEME, "Tech"));
    mg.setTitle(new MediaTitle());
    mg.getTitle().setPlainTextContent(videoTitle);
    mg.setKeywords(new MediaKeywords());
    mg.getKeywords().addKeyword("gdata-test");
    mg.setDescription(new MediaDescription());
View Full Code Here

    output.println("What should I call this video?");
    String videoTitle = readLine();

    VideoEntry newEntry = new VideoEntry();
    YouTubeMediaGroup mg = newEntry.getOrCreateMediaGroup();
    mg.addCategory(new MediaCategory(YouTubeNamespace.CATEGORY_SCHEME, "Tech"));
    mg.setTitle(new MediaTitle());
    mg.getTitle().setPlainTextContent(videoTitle);
    mg.setKeywords(new MediaKeywords());
    mg.getKeywords().addKeyword("gdata-test");
    mg.setDescription(new MediaDescription());
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.