Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CirclesAPI

api

public CirclesAPI - Provides methods to interact with the Circles 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

checkNameIsAvailable

  • checkNameIsAvailable(name: string): Promise<any>
  • POST /api/circles/name-check/ - promises to check if a circle name is available

    Parameters

    • name: string

      The desired name

    Returns Promise<any>

createCircle

  • PUT /api/circles/ - promises to create a new circle

    Parameters

    Returns Promise<any>

    • the circle

Protected delete

  • delete(): Promise<any>

deleteCircle

  • deleteCircle(id: number): Promise<any>
  • DELETE /api/circles/:id/ - promises to delete a circle

    Parameters

    • id: number

      The ID of the circle

    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>

getCircle

  • getCircle(id: number): Promise<any>
  • GET /api/circles/:id/ - promises to get a circle

    Parameters

    • id: number

      The ID of the circle

    Returns Promise<any>

    • the requested circle

getCircles

  • getCircles(): Promise<any>
  • GET /api/circles/ - promises to retrieve all circles

    Returns Promise<any>

    • an array of circles

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>

updateCircle

  • PATCH /api/circles/:id/ - promises to update a circle

    Parameters

    Returns Promise<any>

    • the updated circle

Generated using TypeDoc