Class Content

Represents content from iFunny

Hierarchy

Constructors

Properties

#client: Client<boolean>

Client instance attached to the Object

#creator: null | Creator = null
#endpointUrl: string = Endpoints.account

Endpoint url the object will request to

#payload: APIContent

The payload of the object.

Accessors

  • get canonicalUrl(): string
  • Content url that can be opened in app

    Returns 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 featuredAt(): null | Date
  • When the Content was featured if it was featured

    Returns null | Date

  • get ftag(): null | "attach" | "channel" | "coll" | "feat" | "monofeed" | "mySmiles" | "my-smiles" | "mycomms" | "prof" | "rec" | "sear" | "subs" | "userfeat" | "reads" | "tag"
  • The tag to use for the 'from' parameter

    Returns null | "attach" | "channel" | "coll" | "feat" | "monofeed" | "mySmiles" | "my-smiles" | "mycomms" | "prof" | "rec" | "sear" | "subs" | "userfeat" | "reads" | "tag"

  • get isRepublished(): boolean
  • Is the Content republished by the Client?

    Returns boolean

  • get ocrText(): null | string
  • Text generated from iFunny's OCR (Optical Character Recognition)

    Returns null | string

  • get oldWatermark(): boolean
  • Does the Content use the Old Watermark

    Returns boolean

  • 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 publishedAt(): Date
  • When the Content was published or will publish

    Returns Date

  • get shotStatus(): "approved" | "hardShot" | "shot"
  • The shot status of the content
    approved - Content can be posted in comments
    shot - Content can't be posted in comments
    hardShot - Content was removed by iFunny and is not viewable

    Returns "approved" | "hardShot" | "shot"

  • get state(): "delayed" | "deleted" | "draft" | "published"
  • The state of the Content

    Returns "delayed" | "deleted" | "draft" | "published"

  • get tracebackUrl(): null | string
  • URL of the original source if it exists

    Returns null | string

  • get type(): "coub" | "gif" | "video" | "video_clip" | "vine" | "pic" | "mem" | "comics" | "caption" | "app" | "dem" | "old" | "gif_caption" | "special"
  • The type of the post

    Returns "coub" | "gif" | "video" | "video_clip" | "vine" | "pic" | "mem" | "comics" | "caption" | "app" | "dem" | "old" | "gif_caption" | "special"

  • get visibility(): "closed" | "public" | "subscribers" | "chats"
  • The Content's visibility status
    public - Content shows up in collective and explore subscribers - Content is hidden from Collective and Explore closed - Content is not visible by anyone but the author

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

Methods

  • Removes the Client's smile

    Returns

    Was it success

    Parameters

    • Optional from: "attach" | "channel" | "coll" | "feat" | "monofeed" | "mySmiles" | "my-smiles" | "mycomms" | "prof" | "rec" | "sear" | "subs" | "userfeat" | "reads" | "tag"

      Where the action occured

    Returns Promise<boolean>

  • Removes the Client's unsmile

    Returns

    Was the content marked as smiled

    Parameters

    • Optional from: "attach" | "channel" | "coll" | "feat" | "monofeed" | "mySmiles" | "my-smiles" | "mycomms" | "prof" | "rec" | "sear" | "subs" | "userfeat" | "reads" | "tag"

      Where the content was smiled

    Returns Promise<boolean>

  • Smiles the post

    Returns

    Was it success

    Parameters

    • Optional from: "attach" | "channel" | "coll" | "feat" | "monofeed" | "mySmiles" | "my-smiles" | "mycomms" | "prof" | "rec" | "sear" | "subs" | "userfeat" | "reads" | "tag"

      Where the action occured

    Returns Promise<boolean>

  • When concatenated with a string, this automatically returns the content's id instead of the Content object.

    Example

    console.log(Found post: ${content}); // Logs: Found post: 2hu2ab8J

    Returns string

  • Unsmiles the post

    Returns

    Was it success

    Parameters

    • Optional from: "attach" | "channel" | "coll" | "feat" | "monofeed" | "mySmiles" | "my-smiles" | "mycomms" | "prof" | "rec" | "sear" | "subs" | "userfeat" | "reads" | "tag"

      Where the action occured

    Returns Promise<boolean>

Generated using TypeDoc