Table of Contents

Class Poll

Namespace
Twikit
Assembly
Twikit.dll

ツイートに付いた投票。

public sealed class Poll : IEquatable<Poll>
Inheritance
Poll
Implements
Inherited Members

Constructors

Poll(Client, JsonObject, Tweet?)

public Poll(Client client, JsonObject data, Tweet? tweet = null)

Parameters

client Client
data JsonObject
tweet Tweet

Properties

Choices

選択肢の一覧。

public List<PollChoice> Choices { get; }

Property Value

List<PollChoice>

CountsAreFinal

票数が確定しているか。

public bool CountsAreFinal { get; }

Property Value

bool

DurationMinutes

投票期間(分)。

public int? DurationMinutes { get; }

Property Value

int?

EndDatetimeUtc

終了日時(UTC)。

public string? EndDatetimeUtc { get; }

Property Value

string

Id

投票の ID。

public string Id { get; }

Property Value

string

LastUpdatedDatetimeUtc

最終更新日時(UTC)。

public string? LastUpdatedDatetimeUtc { get; }

Property Value

string

Name

投票の名前(poll2choice_text_only など)。

public string? Name { get; }

Property Value

string

SelectedChoice

自分が選んだ選択肢の番号。

public string? SelectedChoice { get; }

Property Value

string

Tweet

投票が付いたツイート。

public Tweet? Tweet { get; }

Property Value

Tweet

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(Poll?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Poll? other)

Parameters

other Poll

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

VoteAsync(string)

投票します。

public Task<Poll> VoteAsync(string selectedChoice)

Parameters

selectedChoice string

選択肢のラベル、またはその番号('1'、'2'、...)。X は番号しか受け付けないので、ラベルは変換されます。

Returns

Task<Poll>