Skip to content

Latest commit

 

History

History
92 lines (79 loc) · 2.64 KB

File metadata and controls

92 lines (79 loc) · 2.64 KB

ItemContentUnion

Properties

Name Type
typename TypeName
hasModeratedReplies boolean
highlights Highlight
itemType ContentItemType
promotedMetadata { [key: string]: any; }
socialContext SocialContextUnion
tweetDisplayType string
tweetResults ItemResult
cursorType CursorType
displayTreatment DisplayTreatment
entryType ContentEntryType
stopOnEmptyResponse boolean
value string
userDisplayType string
userResults UserResults
tombstoneDisplayType string
tombstoneInfo TombstoneInfo
images Array<TrendImage>
isAiTrend boolean
name string
socialContext SocialContextUnion
thumbnailImage ThumbnailImage
trendMetadata TrendMetadata
trendUrl SocialContextLandingUrl
id string
notificationIcon string
notificationUrl SocialContextLandingUrl
richMessage RichMessage
template NotificationTemplate
timestampMs string

Example

import type { ItemContentUnion } from 'twitter-openapi-typescript-generated'

// TODO: Update the object below with actual values
const example = {
  "typename": null,
  "hasModeratedReplies": null,
  "highlights": null,
  "itemType": null,
  "promotedMetadata": null,
  "socialContext": null,
  "tweetDisplayType": null,
  "tweetResults": null,
  "cursorType": null,
  "displayTreatment": null,
  "entryType": null,
  "stopOnEmptyResponse": null,
  "value": null,
  "userDisplayType": null,
  "userResults": null,
  "tombstoneDisplayType": null,
  "tombstoneInfo": null,
  "images": null,
  "isAiTrend": null,
  "name": null,
  "socialContext": null,
  "thumbnailImage": null,
  "trendMetadata": null,
  "trendUrl": null,
  "id": null,
  "notificationIcon": null,
  "notificationUrl": null,
  "richMessage": null,
  "template": null,
  "timestampMs": null,
} satisfies ItemContentUnion

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 ItemContentUnion
console.log(exampleParsed)

[Back to top] [Back to API list] [Back to Model list] [Back to README]