Options
All
  • Public
  • Public/Protected
  • All
Menu

Module twitter/components

Index

Component

Send an animated gif by direct message or attach it to a tweet

props

MediaProps

guides

Check official guide.

Block a user

props

BlockProps

guides

Check official guide.

CancelRetweet a tweet

props

CancelRetweetProps

guides

Check official guide.

Send a direct message

props

DirectMessageProps

guides

Check official guide.

Send direct messages with metadata

props

ExpressionProps

guides

Check official guides.

Follow a user

props

FollowProps

guides

Check official guide.

Like a tweet

props

LikeProps

guides

Check official guide.

Mark messages as read in the direct message chat

props

MarkReadProps

guides

Check official guide.

Mute a user

props

MuteProps

guides

Check official guide.

Send a photo by direct message or attach it to a tweet

props

MediaProps

guides

Check official guide.

QuickReply: TwitterComponent<QuickReplyProps, PartSegment<unknown>> = ...

QuickReply a tweet

props

QuickReplyProps

guides

Check official guide.

Retweet a tweet

props

RetweetProps

guides

Check official guide.

Send direct messages with metadata

props

TweetProps

guides

Check official guides.

Display typing action in the direct message chat

props

{@link TypingProps}

guides

Check official reference.

Unblock a user

props

UnblockProps

guides

Check official guide.

Unfollow a user

props

UnfollowProps

guides

Check official guide.

Unlike a tweet

props

UnlikeProps

guides

Check official guide.

Unmute a user

props

UnmuteProps

guides

Check official guide.

UrlButton: TwitterComponent<UrlButtonProps, PartSegment<unknown>> = ...

Attach a button for opening a URL to the direct message

props

UrlButtonProps

guides

Check official reference.

Send a video by direct message or attach it to a tweet

props

MediaProps

guides

Check official guide.

Props

BlockProps: { userId: string }

Type declaration

  • userId: string

    The user id to be blocked

CancelRetweetProps: { tweetId: string }

Type declaration

  • tweetId: string

    The retweeted tweet id to be canceled

DirectMessageProps: { buttons?: MachinatNode; children?: MachinatNode; coordinates?: { latitude: number; longitude: number }; customProfileId?: string; media?: MachinatNode; placeId?: string; quickReplies?: MachinatNode }

Type declaration

  • Optional buttons?: MachinatNode

    Url buttons to be attached below the messages. Should contain only UrlButton

  • Optional children?: MachinatNode

    Texual content of the direct message

  • Optional coordinates?: { latitude: number; longitude: number }

    The coordinates of the location

    • latitude: number
    • longitude: number
  • Optional customProfileId?: string

    The custome profile to send the messages with

  • Optional media?: MachinatNode

    The media attached to the message. Should contain exactly one Photo, Video or AnimatedGif

  • Optional placeId?: string

    The twitter place represent the location. You can search places using geo/search API

  • Optional quickReplies?: MachinatNode

    Quick replies to be attached after the messages. Should contain only QuickReply

ExpressionProps: { children: MachinatNode; customProfileId?: string; quickReplies?: MachinatNode }

Type declaration

  • children: MachinatNode

    Direct messages content

  • Optional customProfileId?: string

    The custome profile to send the messages with

  • Optional quickReplies?: MachinatNode

    Quick replies to be attached after the messages. Should contain only QuickReply

FollowProps: { userId: string }

Type declaration

  • userId: string

    The user id to follow

LikeProps: { tweetId: string }

Type declaration

  • tweetId: string

    The tweet id to be liked

MediaProps: { additionalOwners?: string[]; assetTag?: string; fileData?: Buffer | NodeJS.ReadableStream; fileSize?: number; fileType?: string; mediaCategory?: string; mediaId?: string; shared?: boolean; url?: string }

Type declaration

  • Optional additionalOwners?: string[]

    A comma-separated list of user IDs to set as additional owners allowed to use the returned media_id in Tweets or Cards. Up to 100 additional owners may be specified

  • Optional assetTag?: string

    The tag to store media asset with

  • Optional fileData?: Buffer | NodeJS.ReadableStream

    The file content to be upload

  • Optional fileSize?: number

    The file size in bytes. Required when uploading using file

  • Optional fileType?: string

    The content type of the file. Required when uploading using file

  • Optional mediaCategory?: string

    A string enum value which identifies a media usecase. This identifier is used to enforce usecase specific constraints (e.g. file size, video duration) and enable advanced features

  • Optional mediaId?: string

    The uploaded media id

  • Optional shared?: boolean

    Set to true if media asset will be reused for multiple Direct Messages. Default is false

  • Optional url?: string

    The media file url

MuteProps: { userId: string }

Type declaration

  • userId: string

    The user id to be muted

QuickReplyProps: { description?: string; label: string; metadata?: string }

Type declaration

  • Optional description?: string

    Optional description text displayed under label text. All options must have this property defined if property is present in any option. Text is auto-wrapped and will display on a max of two lines and supports n for controling line breaks. Description text is not include in the user's message response. String, max length of 72 characters including spaces

  • label: string

    The text label displayed on the button face. Label text is returned as the user's message response. String, max length of 36 characters including spaces. Values with URLs are not allowed and will return an error

  • Optional metadata?: string

    Metadata that will be sent back in the webhook request. String, max length of 1,000 characters including spaces

RetweetProps: { tweetId: string }

Type declaration

  • tweetId: string

    The tweet id to be retweeted

TweetProps: { children?: MachinatNode; directMessageLink?: boolean | string | { recipientId?: string; text?: string; welcomeMessageId?: string }; excludeUsersInReply?: string[]; media?: MachinatNode; placeId?: string; poll?: { durationMinutes: number; options: string[] }; quoteTweetId?: string; replySetting?: "everyone" | "following" | "mentionedUsers"; superFollowersOnly?: boolean; tagUsersInMedia?: string[] }

Type declaration

  • Optional children?: MachinatNode

    Texual content of the tweet

  • Optional directMessageLink?: boolean | string | { recipientId?: string; text?: string; welcomeMessageId?: string }

    Tweets a link directly to a Direct Message conversation with an account. By default it links to the agent who create the tweet. You can directly pass the URL string or an object specifying the URL queries.

  • Optional excludeUsersInReply?: string[]

    A list of User IDs to be excluded from the reply Tweet thus removing a user from a thread

  • Optional media?: MachinatNode

    Attach media to the tweet. Should contain only Media. This is mutually exclusive from poll and quoteTweetId

  • Optional placeId?: string

    Place ID being attached to the Tweet for geo location

  • Optional poll?: { durationMinutes: number; options: string[] }

    Attach a poll to the tweet. This is mutually exclusive from media and quoteTweetId

    • durationMinutes: number

      Duration of the poll in minutes for a Tweet with a poll

    • options: string[]

      A list of poll options for a Tweet with a poll

  • Optional quoteTweetId?: string

    Link to the Tweet being quoted. This is mutually exclusive from media and poll

  • Optional replySetting?: "everyone" | "following" | "mentionedUsers"

    Indicate who can reply to the Tweet. Default to 'everyone'

  • Optional superFollowersOnly?: boolean

    Tweet exclusively for Super Followers.

  • Optional tagUsersInMedia?: string[]

    A list of User IDs being tagged in the Tweet with Media. If the user you're tagging doesn't have photo-tagging enabled, their names won't show up in the list of tagged users even though the Tweet is successfully created

UnblockProps: { userId: string }

Type declaration

  • userId: string

    The user id to be unblocked

UnfollowProps: { userId: string }

Type declaration

  • userId: string

    The user id to unfollow

UnlikeProps: { tweetId: string }

Type declaration

  • tweetId: string

    The tweet id to be unliked

UnmuteProps: { userId: string }

Type declaration

  • userId: string

    The user id to be unmuted

UrlButtonProps: { label: string; url: string }

Type declaration

  • label: string

    The text that will be displayed to the user on each button. Max string length of 36 characters

  • url: string

    A valid http or https target URL of the button

Other

MarkReadProps: { messageId: string }

Type declaration

  • messageId: string

    The message ID of the most recent message to be marked read. All messages before it will be marked read as well

Generated using TypeDoc