Options
All
  • Public
  • Public/Protected
  • All
Menu

Class User

Represents a user

param client

tweets.js client

param apiData

Raw User Object from twitter api

Hierarchy

  • User

Index

Constructors

constructor

Properties

URL

URL: null | string

A URL provided by the user in association with their profile.

Private _apiData

_apiData: any

avatarUrl

avatarUrl: string

Https avatar url of this user

bannerUrl

bannerUrl: string

Https Banner Url of this user

client

client: Client

Tweets.js Client

createdAt

createdAt: Date

Date when the user created the Account, apiData date converted to js Date

defaultImg

defaultImg: string

Default icon of this user

followers

followers: number

Number of followers this user has

friends

friends: number

Number of Friends this user have

id

id: string

Id of this user

likedPosts

likedPosts: number

Number of Liked Posts this user has

profileURL

profileURL: string

Direct link to user, https://twitter.com/ joined with users screen name

screenName

screenName: string

Users screen name

tweetsProtected

tweetsProtected: boolean

When true, indicates that this user has chosen to protect their Tweets. See About Public and Protected Tweets

username

username: string

username of this user

verified

verified: boolean

When true, indicates that the user has a verified account. See Verified Accounts.

Methods

follow

  • follow(enableNotifications?: Boolean): Promise<User>
  • follows this user, alias function to main client "follow()"

    Parameters

    • enableNotifications: Boolean = true

      if true, sends api param follow set to true, enables notifications for the followed user

    Returns Promise<User>

getFollowers

  • getFollowers(options?: { page: { count: number; cursor: number; noStatus: boolean }; pages: number }): Promise<User[][]>
  • Parameters

    • options: { page: { count: number; cursor: number; noStatus: boolean }; pages: number } = ...
      • page: { count: number; cursor: number; noStatus: boolean }
        • count: number
        • cursor: number
        • noStatus: boolean
      • pages: number

    Returns Promise<User[][]>

unfollow

  • unfollow(): Promise<User>

Generated using TypeDoc