Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PostsAPI

Hierarchy

Index

Constructors

constructor

Properties

Protected _api

Protected _endpoint

_endpoint: string

Protected _headers

_headers: object

Protected _okuna

_okuna: Client

Defines an API request.

param

Protected _params

_params: RequestParams

Protected _paths

_paths: string[] = []

Protected _url

_url: string

requiresToken

requiresToken: boolean = true

Methods

_constructFormdata

  • _constructFormdata(opts?: object | null): FormData
  • constructFormdata() Constructs a FormData instance from an object.

    Parameters

    • Default value opts: object | null = null

      the object to generate the FormData from

    Returns FormData

addMediaToPost

  • addMediaToPost(uuid: string, opts: IAddMediaOpts): Promise<any>

closePost

  • closePost(uuid: string): Promise<any>

commentOnPost

  • commentOnPost(uuid: string, text: string): Promise<any>
  • Parameters

    • uuid: string
    • text: string

    Returns Promise<any>

createPost

Protected delete

  • delete(): Promise<any>

deletePostComment

  • deletePostComment(postUuid: string, commentId: number): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number

    Returns Promise<any>

deletePostCommentReaction

  • deletePostCommentReaction(postUuid: string, commentId: number, reactionId: number): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number
    • reactionId: number

    Returns Promise<any>

deletePostReaction

  • deletePostReaction(postUuid: string, reactionId: number): Promise<any>
  • Parameters

    • postUuid: string
    • reactionId: number

    Returns Promise<any>

deletePostWithUuid

  • deletePostWithUuid(uuid: string): Promise<any>

disableCommentsForPost

  • disableCommentsForPost(uuid: string): Promise<any>

editPost

editPostComment

  • editPostComment(postUuid: string, commentId: number, text: string): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number
    • text: string

    Returns Promise<any>

enableCommentsForPost

  • enableCommentsForPost(uuid: string): Promise<any>

generateHeaders

  • generateHeaders(contentType?: string | null): object
  • generateHeaders() A function used to generate the headers that need to be passed to the request performee.

    Parameters

    • Default value contentType: string | null = null

    Returns object

Protected get

  • get(): Promise<any>

getCommentsForPost

getPostComment

  • getPostComment(postUuid: string, commentId: number): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number

    Returns Promise<any>

getPostMedia

  • getPostMedia(uuid: string): Promise<any>

getPostParticipants

getPostStatus

  • getPostStatus(uuid: string): Promise<any>

getPostWithUuid

  • getPostWithUuid(uuid: string): Promise<any>

getPreviewData

  • getPreviewData(uuid: string): Promise<any>

getReactionEmojiGroups

  • getReactionEmojiGroups(): Promise<any>

getReactionsEmojiCountForPost

  • getReactionsEmojiCountForPost(uuid: string): Promise<any>

getReactionsEmojiCountForPostComment

  • getReactionsEmojiCountForPostComment(postUuid: string, commentId: number): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number

    Returns Promise<any>

getReactionsForPost

getReactionsForPostComment

  • getReactionsForPostComment(postUuid: string, commentId: number, opts: IGetReactionsForPost): Promise<any>

getRepliesForPostComment

  • getRepliesForPostComment(postUuid: string, postCommentId: number, opts: ExtraLimitationParams): Promise<any>

getTimelinePosts

getTopPosts

getTrendingPosts

mutePost

  • mutePost(uuid: string): Promise<any>

mutePostComment

  • mutePostComment(postUuid: string, commentId: number): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number

    Returns Promise<any>

openPost

  • openPost(uuid: string): Promise<any>

Protected patch

  • patch(body: object): Promise<any>

Protected patchFormdata

  • patchFormdata(body: object): Promise<any>

Protected post

  • post(body: object): Promise<any>

Protected postFormdata

  • postFormdata(body: object): Promise<any>

publishPost

  • publishPost(uuid: string): Promise<any>

Protected put

  • put(body: object): Promise<any>

Protected putFormdata

  • putFormdata(body: object): Promise<any>

reactToPost

  • reactToPost(uuid: string, emojiId: number): Promise<any>
  • Parameters

    • uuid: string
    • emojiId: number

    Returns Promise<any>

reactToPostComment

  • reactToPostComment(postUuid: string, commentId: number, emojiId: number): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number
    • emojiId: number

    Returns Promise<any>

replyPostComment

  • replyPostComment(postUuid: string, commentId: number, text: string): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number
    • text: string

    Returns Promise<any>

reportPost

reportPostComment

searchPostParticipants

translatePost

  • translatePost(uuid: string): Promise<any>

translatePostComment

  • translatePostComment(postUuid: string, commentId: number): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number

    Returns Promise<any>

unmutePost

  • unmutePost(uuid: string): Promise<any>

unmutePostComment

  • unmutePostComment(postUuid: string, commentId: number): Promise<any>
  • Parameters

    • postUuid: string
    • commentId: number

    Returns Promise<any>

Generated using TypeDoc