Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UserInvitesAPI

api

public UserInvitesAPI - Provides methods to interact with the User Invites API

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

create

  • create(nickname: string): Promise<any>
  • PUT /api/invites/ - promises to create an invite

    Parameters

    • nickname: string

      A nickname for the notification

    Returns Promise<any>

Protected delete

  • delete(): Promise<any>

deleteUserInvite

  • deleteUserInvite(id: number): Promise<any>
  • DELETE /api/invites/:id/ - promises to delete an invite

    Parameters

    • id: number

      The ID of the invite

    Returns Promise<any>

email

  • email(id: number, email: string): Promise<any>
  • POST /api/invites/:id/email/ - promises to sent an email with the invitation

    Parameters

    • id: number

      The ID of the invite

    • email: string

      The email to which the invite will be sent

    Returns 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>

getUserInvites

  • getUserInvites(offset?: number | null, count?: number | null, pending?: boolean | null): Promise<any>
  • GET /api/invites/ - promises to retrieve a list of all invites

    Parameters

    • Default value offset: number | null = null
    • Default value count: number | null = null
    • Default value pending: boolean | null = null

    Returns 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>

searchUserInvite

  • searchUserInvite(query: string, count?: number | null, pending?: boolean | null): Promise<any>
  • GET /api/invites/search/ - promises to search between the user invites

    Parameters

    • query: string
    • Default value count: number | null = null
    • Default value pending: boolean | null = null

    Returns Promise<any>

update

  • update(id: number, nickname: string): Promise<any>
  • PATCH /api/invites/ - promises to update a notification's nickname

    Parameters

    • id: number

      The ID of the notification

    • nickname: string

      The new nickname

    Returns Promise<any>

Generated using TypeDoc