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
clientClientdataJsonObject
Properties
AttachmentUrl
引用するツイートの URL(引用でなければ null)。
public string? AttachmentUrl { get; }
Property Value
AutoPopulateReplyMetadata
返信先の @ メンションを自動で付けるか。
public bool AutoPopulateReplyMetadata { get; }
Property Value
ExcludeReplyUserIds
返信から除外するユーザー ID。
public List<string> ExcludeReplyUserIds { get; }
Property Value
Id
下書きの ID。
public string Id { get; }
Property Value
InReplyToTweetId
返信先のツイート ID(返信でなければ null)。
public string? InReplyToTweetId { get; }
Property Value
MediaIds
添付するメディア ID の一覧。
public List<string> MediaIds { get; }
Property Value
Raw
応答の生の JSON。
public JsonObject Raw { get; }
Property Value
Request
保存されている tweet_create_request そのもの。
public JsonObject Request { get; }
Property Value
Text
本文。
public string Text { get; }
Property Value
ThreadTweets
スレッドの続きのツイート(生の JSON)。
public JsonArray ThreadTweets { get; }
Property Value
Type
リクエストの種類(PostTweetRequest)。
public string? Type { get; }
Property Value
UserId
下書きの持ち主のユーザー ID。
public string? UserId { get; }
Property Value
Methods
DeleteAsync()
この下書きを削除します。
public Task<HttpResponseMessage> DeleteAsync()
Returns
PostAsync()
この下書きを投稿し、下書きを削除します(PostDraftTweetAsync(DraftTweet))。
public Task<Tweet> PostAsync()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.