| Name | Type |
|---|---|
typename |
TypeName |
article |
Article |
authorCommunityRelationship |
AuthorCommunityRelationship |
birdwatchPivot |
BirdwatchPivot |
card |
TweetCard |
communityRelationship |
CommunityRelationship |
communityResults |
CommunityResult |
contentDisclosure |
ContentDisclosure |
core |
UserResultCore |
editControl |
TweetEditControl |
editPrespective |
TweetEditPrespective |
grokAnalysisButton |
boolean |
grokAnalysisFollowups |
Array<string> |
grokAnnotations |
GrokAnnotation |
grokShareAttachment |
GrokShareAttachment |
grokTranslatedPostWithAvailability |
GrokTranslatedPostWithAvailability |
hasBirdwatchNotes |
boolean |
isTranslatable |
boolean |
legacy |
TweetLegacy |
noteTweet |
NoteTweet |
postCta |
TweetPostCta |
postImageDescription |
string |
postVideoDescription |
string |
previousCounts |
TweetPreviousCounts |
quickPromoteEligibility |
object |
quotedRefResult |
QuotedRefResult |
quotedStatusResult |
ItemResult |
restId |
string |
source |
string |
superFollowsReplyUserResult |
SuperFollowsReplyUserResult |
trendResults |
TrendResults |
unifiedCard |
UnifiedCard |
unmentionData |
{ [key: string]: any; } |
views |
TweetView |
limitedActionResults |
{ [key: string]: any; } |
mediaVisibilityResults |
MediaVisibilityResults |
tweet |
TweetPreviewDisplayTweet |
tweetInterstitial |
TweetInterstitial |
reason |
string |
cta |
TweetPreviewDisplayCta |
limitedActionResults |
TweetLimitedActionResults |
import type { TweetUnion } from 'twitter-openapi-typescript-generated'
// TODO: Update the object below with actual values
const example = {
"typename": null,
"article": null,
"authorCommunityRelationship": null,
"birdwatchPivot": null,
"card": null,
"communityRelationship": null,
"communityResults": null,
"contentDisclosure": null,
"core": null,
"editControl": null,
"editPrespective": null,
"grokAnalysisButton": null,
"grokAnalysisFollowups": null,
"grokAnnotations": null,
"grokShareAttachment": null,
"grokTranslatedPostWithAvailability": null,
"hasBirdwatchNotes": null,
"isTranslatable": null,
"legacy": null,
"noteTweet": null,
"postCta": null,
"postImageDescription": null,
"postVideoDescription": null,
"previousCounts": null,
"quickPromoteEligibility": null,
"quotedRefResult": null,
"quotedStatusResult": null,
"restId": null,
"source": null,
"superFollowsReplyUserResult": null,
"trendResults": null,
"unifiedCard": null,
"unmentionData": null,
"views": null,
"limitedActionResults": null,
"mediaVisibilityResults": null,
"tweet": null,
"tweetInterstitial": null,
"reason": null,
"cta": null,
"limitedActionResults": null,
} satisfies TweetUnion
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as TweetUnion
console.log(exampleParsed)[Back to top] [Back to API list] [Back to Model list] [Back to README]