Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommunitiesAPI

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

addCommunityAdministrator

  • addCommunityAdministrator(communityName: string, username: string): Promise<any>

addCommunityModerator

  • addCommunityModerator(communityName: string, username: string): Promise<any>

banCommunityUser

  • banCommunityUser(communityName: string, username: string): Promise<any>

checkNameIsAvailable

  • checkNameIsAvailable(name: string): Promise<any>

createCommunity

createPost

  • createPost(communityName: string, opts: ICreatePost): Promise<any>

Protected delete

  • delete(): Promise<any>

deleteCommunity

  • deleteCommunity(name: string): Promise<any>

deleteCommunityAvatar

  • deleteCommunityAvatar(name: string): Promise<any>

deleteCommunityCover

  • deleteCommunityCover(name: string): Promise<any>

excludeCommunityFromTopPosts

  • excludeCommunityFromTopPosts(communityName: string): Promise<any>

favoriteCommunity

  • favoriteCommunity(communityName: 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>

getAdministratedCommunities

getAdministratorsForCommunity

  • getAdministratorsForCommunity(name: string, opts: LimitationParams): Promise<any>

getBannedUsersForCommunity

  • getBannedUsersForCommunity(name: string, opts: LimitationParams): Promise<any>

getClosedPostsForCommunity

getCommunitiesWithQuery

  • getCommunitiesWithQuery(query: string, authenticatedRequest?: boolean): Promise<any>
  • Parameters

    • query: string
    • Default value authenticatedRequest: boolean = true

    Returns Promise<any>

getCommunity

  • getCommunity(name: string, authenticatedRequest?: boolean): Promise<any>
  • Parameters

    • name: string
    • Default value authenticatedRequest: boolean = true

    Returns Promise<any>

getExcludedCommunities

getFavoriteCommunities

getJoinedCommunities

getMembersForCommunity

getModeratedCommunities

getModeratedObjects

getModeratorsForCommunity

getPostsForCommunity

getSubscribedCommunities

getSuggestedCommunities

  • getSuggestedCommunities(): Promise<any>

getTrendingCommunities

  • getTrendingCommunities(authenticatedRequest?: boolean, category?: string | null): Promise<any>
  • Parameters

    • Default value authenticatedRequest: boolean = true
    • Default value category: string | null = null

    Returns Promise<any>

inviteUserToCommunity

  • inviteUserToCommunity(communityName: string, username: string): Promise<any>

joinCommunity

  • joinCommunity(name: string): Promise<any>

leaveCommunity

  • leaveCommunity(name: 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>

Protected put

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

Protected putFormdata

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

removeCommunityAdministrator

  • removeCommunityAdministrator(communityName: string, username: string): Promise<any>

removeCommunityModerator

  • removeCommunityModerator(communityName: string, username: string): Promise<any>

reportCommunity

searchAdministratedCommunities

searchAdministrators

  • searchAdministrators(communityName: string, query: string): Promise<any>

searchBannedUsers

  • searchBannedUsers(communityName: string, query: string): Promise<any>

searchExcludedCommunities

searchFavoriteCommunities

searchJoinedCommunities

searchMembers

searchModeratedCommunities

searchModerators

  • searchModerators(communityName: string, query: string): Promise<any>

searchSubscribedCommunities

subscribeToCommunity

  • subscribeToCommunity(communityName: string): Promise<any>

unbanCommunityUser

  • unbanCommunityUser(communityName: string, username: string): Promise<any>

undoExcludeCommunityFromTopPosts

  • undoExcludeCommunityFromTopPosts(communityName: string): Promise<any>

unfavoriteCommunity

  • unfavoriteCommunity(communityName: string): Promise<any>

uninviteUserToCommunity

  • uninviteUserToCommunity(communityName: string, username: string): Promise<any>

unsubscribeToCommunit

  • unsubscribeToCommunit(communityName: string): Promise<any>

updateCommunity

updateCommunityAvatar

  • updateCommunityAvatar(name: string, avatar: IFileObjectOpts): Promise<any>

updateCommunityCover

Generated using TypeDoc