Table of Contents

Class DraftTweet

Namespace
Twikit
Assembly
Twikit.dll

下書き(X の「未送信ポスト」→「下書き」)。

public sealed class DraftTweet
Inheritance
DraftTweet
Inherited Members

Remarks

X は下書きを、投稿時に送る post_tweet_request と同じ形で保存します。2026-10-23 時点で確認した フィールドは本文(status)、メディア ID、引用元 URL(attachment_url)、返信先(in_reply_to_status_id)、 返信メタデータの自動補完フラグ、返信から除外するユーザー ID、スレッド(thread_tweets)です。それ以外は Request から読めます。投稿専用の API は無く、Web クライアントは通常の CreateTweet を送ってから下書きを 削除します(PostAsync())。

Constructors

DraftTweet(Client, JsonObject)

public DraftTweet(Client client, JsonObject data)

Parameters

client Client
data JsonObject

Properties

AttachmentUrl

引用するツイートの URL(引用でなければ null)。

public string? AttachmentUrl { get; }

Property Value

string

AutoPopulateReplyMetadata

返信先の @ メンションを自動で付けるか。

public bool AutoPopulateReplyMetadata { get; }

Property Value

bool

ExcludeReplyUserIds

返信から除外するユーザー ID。

public List<string> ExcludeReplyUserIds { get; }

Property Value

List<string>

Id

下書きの ID。

public string Id { get; }

Property Value

string

InReplyToTweetId

返信先のツイート ID(返信でなければ null)。

public string? InReplyToTweetId { get; }

Property Value

string

MediaIds

添付するメディア ID の一覧。

public List<string> MediaIds { get; }

Property Value

List<string>

Raw

応答の生の JSON。

public JsonObject Raw { get; }

Property Value

JsonObject

Request

保存されている tweet_create_request そのもの。

public JsonObject Request { get; }

Property Value

JsonObject

Text

本文。

public string Text { get; }

Property Value

string

ThreadTweets

スレッドの続きのツイート(生の JSON)。

public JsonArray ThreadTweets { get; }

Property Value

JsonArray

Type

リクエストの種類(PostTweetRequest)。

public string? Type { get; }

Property Value

string

UserId

下書きの持ち主のユーザー ID。

public string? UserId { get; }

Property Value

string

Methods

DeleteAsync()

この下書きを削除します。

public Task<HttpResponseMessage> DeleteAsync()

Returns

Task<HttpResponseMessage>

PostAsync()

この下書きを投稿し、下書きを削除します(PostDraftTweetAsync(DraftTweet))。

public Task<Tweet> PostAsync()

Returns

Task<Tweet>

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.