Class Media
- Namespace
- Twikit
- Assembly
- Twikit.dll
メディアオブジェクトの基底クラス。
public class Media
- Inheritance
-
Media
- Derived
- Inherited Members
Constructors
Media(IRequestClient, JsonObject)
public Media(IRequestClient client, JsonObject data)
Parameters
clientIRequestClientdataJsonObject
Fields
ClientRef
protected readonly IRequestClient ClientRef
Field Value
Properties
Data
X から受け取った生の JSON。
public JsonObject Data { get; }
Property Value
DisplayUrl
表示用 URL。
public string? DisplayUrl { get; }
Property Value
ExpandedUrl
展開済みの表示 URL。
public string? ExpandedUrl { get; }
Property Value
FocusRects
public JsonArray? FocusRects { get; }
Property Value
Height
高さ。
public int? Height { get; }
Property Value
- int?
Id
メディア ID。
public string? Id { get; }
Property Value
MediaUrl
メディアの URL。
public string? MediaUrl { get; }
Property Value
OriginalInfo
public JsonObject? OriginalInfo { get; }
Property Value
Sizes
各サイズの情報。
public JsonObject? Sizes { get; }
Property Value
SourceStatusId
元のツイートの ID。
public string? SourceStatusId { get; }
Property Value
SourceUrl
元の(フル解像度の)メディア URL。
public string? SourceUrl { get; }
Property Value
SourceUserId
元のツイートを投稿したユーザーの ID。
public string? SourceUserId { get; }
Property Value
Type
メディアの種類(photo / video / animated_gif)。
public string? Type { get; }
Property Value
Url
t.co の URL。
public string? Url { get; }
Property Value
Width
幅。
public int? Width { get; }
Property Value
- int?
Methods
DownloadAsync(string)
メディアをファイルに保存します。
public Task DownloadAsync(string outputPath)
Parameters
outputPathstring
Returns
FromData(IRequestClient, JsonObject)
メディア JSON から適切なクラスのインスタンスを作ります。未知の種類は警告を出して null。
public static Media? FromData(IRequestClient client, JsonObject data)
Parameters
clientIRequestClientdataJsonObject
Returns
GetAsync()
メディアの内容を取得します。
public Task<byte[]> GetAsync()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.