Table of Contents

Class ApiResponse

Namespace
Twikit.Api
Assembly
Twikit.dll

API の応答。本文は JSON として解析済み(JSON でなければ Json は null)で、 生のバイト列・テキストと HttpResponseMessage も参照できます。

public sealed class ApiResponse
Inheritance
ApiResponse
Inherited Members

Constructors

ApiResponse(HttpResponseMessage, byte[])

public ApiResponse(HttpResponseMessage http, byte[] bytes)

Parameters

http HttpResponseMessage
bytes byte[]

ApiResponse(HttpResponseMessage, string)

public ApiResponse(HttpResponseMessage http, string text)

Parameters

http HttpResponseMessage
text string

Properties

Array

Json を配列として。

public JsonArray? Array { get; }

Property Value

JsonArray

Bytes

本文の生のバイト列。Jetfuel(/i/jfapi/)のようにバイナリを返すエンドポイントはこちらを読みます (Text は UTF-8 として復号したものなので、バイナリは壊れます)。

public byte[] Bytes { get; }

Property Value

byte[]

Http

public HttpResponseMessage Http { get; }

Property Value

HttpResponseMessage

Json

本文を JSON として解析したもの。JSON でなければ null。

public JsonNode? Json { get; }

Property Value

JsonNode

Object

Json をオブジェクトとして。

public JsonObject? Object { get; }

Property Value

JsonObject

StatusCode

public int StatusCode { get; }

Property Value

int

Text

本文のテキスト(UTF-8)。

public string Text { get; }

Property Value

string