Youtube直播API:我无法为新的直播活动添加标签

时间:2016-11-03 09:01:43

标签: android api youtube live-streaming

从我的Android应用程序创建实时事件时,我似乎无法为该事件添加任何标记。 youtube api使用BroadcastSnippet类为新的直播活动设置所有基本信息。 BroadcastSnippet类不包含标签字段。但是,当我从Web浏览器创建实时事件时,我可以为新的实时事件添加标签。有没有人知道如何使用我的Android手机以编程方式使用youtube api为现场活动添加标签?

直播片段类:

public final class LiveBroadcastSnippet extends com.google.api.client.json.GenericJson {

  /**
   * The date and time that the broadcast actually ended. This information is only available once
   * the broadcast's state is complete. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
   * format.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private com.google.api.client.util.DateTime actualEndTime;

  /**
   * The date and time that the broadcast actually started. This information is only available once
   * the broadcast's state is live. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
   * format.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private com.google.api.client.util.DateTime actualStartTime;

  /**
   * The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String channelId;

  /**
   * The broadcast's description. As with the title, you can set this field by modifying the
   * broadcast resource or by setting the description field of the corresponding video resource.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String description;

  /**
   * The date and time that the broadcast was added to YouTube's live broadcast schedule. The value
   * is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private com.google.api.client.util.DateTime publishedAt;

  /**
   * The date and time that the broadcast is scheduled to end. The value is specified in ISO 8601
   * (YYYY-MM-DDThh:mm:ss.sZ) format.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private com.google.api.client.util.DateTime scheduledEndTime;

  /**
   * The date and time that the broadcast is scheduled to start. The value is specified in ISO 8601
   * (YYYY-MM-DDThh:mm:ss.sZ) format.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private com.google.api.client.util.DateTime scheduledStartTime;

  /**
   * A map of thumbnail images associated with the broadcast. For each nested object in this object,
   * the key is the name of the thumbnail image, and the value is an object that contains other
   * information about the thumbnail.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ThumbnailDetails thumbnails;

  /**
   * The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can
   * set this field by modifying the broadcast resource or by setting the title field of the
   * corresponding video resource.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String title;

  /**
   * The date and time that the broadcast actually ended. This information is only available once
   * the broadcast's state is complete. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
   * format.
   * @return value or {@code null} for none
   */
  public com.google.api.client.util.DateTime getActualEndTime() {
    return actualEndTime;
  }

  /**
   * The date and time that the broadcast actually ended. This information is only available once
   * the broadcast's state is complete. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
   * format.
   * @param actualEndTime actualEndTime or {@code null} for none
   */
  public LiveBroadcastSnippet setActualEndTime(com.google.api.client.util.DateTime actualEndTime) {
    this.actualEndTime = actualEndTime;
    return this;
  }

  /**
   * The date and time that the broadcast actually started. This information is only available once
   * the broadcast's state is live. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
   * format.
   * @return value or {@code null} for none
   */
  public com.google.api.client.util.DateTime getActualStartTime() {
    return actualStartTime;
  }

  /**
   * The date and time that the broadcast actually started. This information is only available once
   * the broadcast's state is live. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
   * format.
   * @param actualStartTime actualStartTime or {@code null} for none
   */
  public LiveBroadcastSnippet setActualStartTime(com.google.api.client.util.DateTime actualStartTime) {
    this.actualStartTime = actualStartTime;
    return this;
  }

  /**
   * The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast.
   * @return value or {@code null} for none
   */
  public java.lang.String getChannelId() {
    return channelId;
  }

  /**
   * The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast.
   * @param channelId channelId or {@code null} for none
   */
  public LiveBroadcastSnippet setChannelId(java.lang.String channelId) {
    this.channelId = channelId;
    return this;
  }

  /**
   * The broadcast's description. As with the title, you can set this field by modifying the
   * broadcast resource or by setting the description field of the corresponding video resource.
   * @return value or {@code null} for none
   */
  public java.lang.String getDescription() {
    return description;
  }

  /**
   * The broadcast's description. As with the title, you can set this field by modifying the
   * broadcast resource or by setting the description field of the corresponding video resource.
   * @param description description or {@code null} for none
   */
  public LiveBroadcastSnippet setDescription(java.lang.String description) {
    this.description = description;
    return this;
  }

  /**
   * The date and time that the broadcast was added to YouTube's live broadcast schedule. The value
   * is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
   * @return value or {@code null} for none
   */
  public com.google.api.client.util.DateTime getPublishedAt() {
    return publishedAt;
  }

  /**
   * The date and time that the broadcast was added to YouTube's live broadcast schedule. The value
   * is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
   * @param publishedAt publishedAt or {@code null} for none
   */
  public LiveBroadcastSnippet setPublishedAt(com.google.api.client.util.DateTime publishedAt) {
    this.publishedAt = publishedAt;
    return this;
  }

  /**
   * The date and time that the broadcast is scheduled to end. The value is specified in ISO 8601
   * (YYYY-MM-DDThh:mm:ss.sZ) format.
   * @return value or {@code null} for none
   */
  public com.google.api.client.util.DateTime getScheduledEndTime() {
    return scheduledEndTime;
  }

  /**
   * The date and time that the broadcast is scheduled to end. The value is specified in ISO 8601
   * (YYYY-MM-DDThh:mm:ss.sZ) format.
   * @param scheduledEndTime scheduledEndTime or {@code null} for none
   */
  public LiveBroadcastSnippet setScheduledEndTime(com.google.api.client.util.DateTime scheduledEndTime) {
    this.scheduledEndTime = scheduledEndTime;
    return this;
  }

  /**
   * The date and time that the broadcast is scheduled to start. The value is specified in ISO 8601
   * (YYYY-MM-DDThh:mm:ss.sZ) format.
   * @return value or {@code null} for none
   */
  public com.google.api.client.util.DateTime getScheduledStartTime() {
    return scheduledStartTime;
  }

  /**
   * The date and time that the broadcast is scheduled to start. The value is specified in ISO 8601
   * (YYYY-MM-DDThh:mm:ss.sZ) format.
   * @param scheduledStartTime scheduledStartTime or {@code null} for none
   */
  public LiveBroadcastSnippet setScheduledStartTime(com.google.api.client.util.DateTime scheduledStartTime) {
    this.scheduledStartTime = scheduledStartTime;
    return this;
  }

  /**
   * A map of thumbnail images associated with the broadcast. For each nested object in this object,
   * the key is the name of the thumbnail image, and the value is an object that contains other
   * information about the thumbnail.
   * @return value or {@code null} for none
   */
  public ThumbnailDetails getThumbnails() {
    return thumbnails;
  }

  /**
   * A map of thumbnail images associated with the broadcast. For each nested object in this object,
   * the key is the name of the thumbnail image, and the value is an object that contains other
   * information about the thumbnail.
   * @param thumbnails thumbnails or {@code null} for none
   */
  public LiveBroadcastSnippet setThumbnails(ThumbnailDetails thumbnails) {
    this.thumbnails = thumbnails;
    return this;
  }

  /**
   * The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can
   * set this field by modifying the broadcast resource or by setting the title field of the
   * corresponding video resource.
   * @return value or {@code null} for none
   */
  public java.lang.String getTitle() {
    return title;
  }

  /**
   * The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can
   * set this field by modifying the broadcast resource or by setting the title field of the
   * corresponding video resource.
   * @param title title or {@code null} for none
   */
  public LiveBroadcastSnippet setTitle(java.lang.String title) {
    this.title = title;
    return this;
  }

  @Override
  public LiveBroadcastSnippet set(String fieldName, Object value) {
    return (LiveBroadcastSnippet) super.set(fieldName, value);
  }

  @Override
  public LiveBroadcastSnippet clone() {
    return (LiveBroadcastSnippet) super.clone();
  }

}

0 个答案:

没有答案