Class User

Represents a user on iFunny

Hierarchy

Constructors

Properties

#client: Client<boolean>

Client instance attached to the Object

#endpointUrl: string = Endpoints.account

Endpoint url the object will request to

#payload: APIUserProfile

The payload of the object.

#timeline: null | Feed = null

Accessors

  • get areYouBlocked(): boolean
  • Does the user have you blocked?

    Returns boolean

  • get blockType(): null | "user" | "installation"
  • The block type if the user is blocked

    Returns null | "user" | "installation"

  • get canChat(): boolean
  • Can the Client chat with the user?
    ? Not checked by the backend

    Alias

    is_available_for_chat

    Returns boolean

  • get chatPrivacy(): "closed" | "public" | "subscribers"
  • The user's chat privacy

    Returns "closed" | "public" | "subscribers"

  • get coverColor(): null | string
  • Cover image background color

    Returns null | string

  • get endpointUrl(): string
  • Endpoint url for requests to update the payload

    Returns string

  • set endpointUrl(value: string): void
  • Parameters

    • value: string

    Returns void

  • get isAvailableForChat(): boolean
  • Can the Client chat with the user?
    ? Not checked by the backend

    Alias

    can_chat

    Returns boolean

  • get isBlocked(): boolean
  • Is the user blocked by the Client?

    Returns boolean

  • get isSubscribedToUpdates(): boolean
  • Is the user subscribed to updates?

    Returns boolean

  • get isSubscriber(): boolean
  • Is the user subscribed to the Client?

    Returns boolean

  • get isSubscription(): boolean
  • Is the client subscribed to the user?

    Returns boolean

  • get messengerActive(): boolean
  • TODO: Add description for messengerActive

    Returns boolean

  • get messengerToken(): string
  • TODO: Add description for messenger_token

    Returns string

  • get nickColor(): null | "55FF00" | "660000" | "e0b400" | "a078f0" | "ff3e52" | "ffffff"
  • The nick color of the user if they have one, else null

    Returns null | "55FF00" | "660000" | "e0b400" | "a078f0" | "ff3e52" | "ffffff"

  • get payload(): Payload
  • Get the payload of the object

    Returns Payload

  • set payload(payload: Partial<Payload>): void
  • Updates the payload of the object.

    Returns

    The current instance

    Parameters

    • payload: Partial<Payload>

      The payload to merge into the current instance

    Returns void

  • get totalAchievements(): number
  • How many achievements the user has

    Returns number

  • get totalFeatures(): number
  • How many features the user has

    Returns number

  • get totalOriginalPosts(): number
  • How many original posts the user has

    Returns number

  • get totalPosts(): number
  • How many posts the user has on their profile

    Returns number

  • get totalRepublishedPosts(): number
  • How many posts the has that are republishes (NOT original)

    Returns number

  • get totalSmiles(): number
  • How many smiles the user has on their profile

    Returns number

  • get totalSubscribers(): number
  • The users subsciber count

    Returns number

  • get totalSubscriptions(): number
  • The users subscription count

    Returns number

Methods

  • Modify the subscription status of the User

    Parameters

    • method: "PUT" | "DELETE"

      "PUT" or "DELETE"

    Returns Promise<User>

  • When concatenated with a string, this automatically returns the user's nick instead of the User object.

    Example

    console.log(Hello from ${user}!); // Logs: Hello from iFunnyChef

    Returns string

Generated using TypeDoc