跳到主要内容

Update poll in chatroom

PUT 

/bv/chatroom/v1/chatrooms/polls/{poll.id}

Modifies an existing poll within the chatroom. Authorization requires the chatroom token with the admin role.

Request

Path Parameters

    poll.id stringrequired

    Optional. Immutable. The uuid of the poll. Required if in update operation, otherwise will be an output only field.

Header Parameters

    authorization string

    This API should be invoked with the chatroom token.

Body

required
    poll object

    Required. The poll to be updated.

    type string

    Possible values: [POLL_TYPE_SINGLE_CHOICE, POLL_TYPE_MULTI_CHOICE]

    Required. Indicates the type of the poll.

    multi_choice object

    Optional. Required if type is POLL_TYPE_SINGLE_CHOICE or POLL_TYPE_MULTI_CHOICE.

    question stringrequired

    Required. The question of the poll.

    options object[]required

    Required. The options of the poll.

  • Array [
  • id string

    Optional. Immutable. The uuid of the option. Required if in update operation, otherwise will be an output only field.

    text stringrequired

    Required. The text of this option would be displayed to the viewer.

    corrected booleanrequired

    Required. Indicates this option would be highlighted to the viewer when the poll is closed.

  • ]

Responses

A successful response.

Schema
    poll object
    id string

    Optional. Immutable. The uuid of the poll. Required if in update operation, otherwise will be an output only field.

    type stringrequired

    Possible values: [POLL_TYPE_SINGLE_CHOICE, POLL_TYPE_MULTI_CHOICE]

    Required. Indicates the type of the poll.

    status string

    Possible values: [POLL_STATUS_QUEUED, POLL_STATUS_ACTIVE, POLL_STATUS_CLOSED, POLL_STATUS_ARCHIVED]

    Output only. Indicates the status of the poll.

    votes_count int32

    Output only. Indicates the total votes in the poll.

    multi_choice object

    Optional. Required if type is POLL_TYPE_SINGLE_CHOICE or POLL_TYPE_MULTI_CHOICE.

    question stringrequired

    Required. The question of the poll.

    options object[]required

    Required. The options of the poll.

  • Array [
  • id string

    Optional. Immutable. The uuid of the option. Required if in update operation, otherwise will be an output only field.

    text stringrequired

    Required. The text of this option would be displayed to the viewer.

    corrected booleanrequired

    Required. Indicates this option would be highlighted to the viewer when the poll is closed.

    votes_count int32

    Output only. Indicates the total votes in the option.

  • ]
  • started_at date-time

    Output only. Indicates the time that the poll started.

    ended_at date-time

    Output only. Indicates the time that the poll ended.

Loading...