Options
All
  • Public
  • Public/Protected
  • All
Menu

ApiClient provides API calls to the remote server.

collboard-system

Hierarchy

  • AbstractSystem
    • ApiClient

Index

Constructors

  • new ApiClient(systems: ISystemsExtended, apiUrl: URL): ApiClient
  • Parameters

    • systems: ISystemsExtended
    • apiUrl: URL

    Returns ApiClient

Properties

apiClientCache: any
apiUrl: any
get: any
post: any
processResponse: any
ready: Promise<void>

Promise which is resolved when the system is initialized and ready to use.

systems: ISystemsExtended

Accessors

  • get isDestroyed(): boolean
  • Is this object destroyed?

    Returns boolean

  • get isReady(): boolean
  • Checks if the system is initialized and ready to use.

    Returns boolean

Methods

  • addSubdestroyable(...subdestroyable: ITeardownLogic[]): ApiClient
  • Binds new registration with itself. This registration/destroyable will be destroyed with this.

    Parameters

    • Rest ...subdestroyable: ITeardownLogic[]

    Returns ApiClient

  • checkIsReady(): void
  • Checks if the system is initialized and ready to use. If not, throws an error. If it is, do nothing.

    Returns void

  • checkWhetherNotDestroyed(errorMessage?: string, runBeforeError?: () => void): void
  • Checks, whether the object is not destroyed

    Parameters

    • Optional errorMessage: string

      Message that will replace default one before error

    • Optional runBeforeError: () => void

      Callback runed before error is thrown; typically this can be some logging

        • (): void
        • Returns void

    Returns void

  • createNewBoard(options: Omit<ICreateBoardOptions, "redirect">): Promise<{ links: { edit: string; view: string }; uriId: string }>
  • deprecated

    Use boardSystem.createNewBoard instead

    Parameters

    • options: Omit<ICreateBoardOptions, "redirect">

    Returns Promise<{ links: { edit: string; view: string }; uriId: string }>

  • destroy(): Promise<void>
  • Returns Promise<void>

  • getAbout(): Promise<{ remoteInstanceId: string; version: string }>
  • Returns Promise<{ remoteInstanceId: string; version: string }>

  • getMyBoards(): Observable<IGetMyBoardsResponse>
  • Returns Observable<IGetMyBoardsResponse>

  • init(): Promise<void>
  • Returns Promise<void>

  • missingTranslateMessage(missingTranslateMessage: ITranslateMessage): Promise<unknown>
  • Parameters

    • missingTranslateMessage: ITranslateMessage

    Returns Promise<unknown>

  • translateMessages(language: string_translate_language): Promise<ITranslateMessage[]>
  • Parameters

    • language: string_translate_language

    Returns Promise<ITranslateMessage[]>

  • isDestroyable(obj: any): obj is IDestroyable
  • Chcek whether the given object is destroyable

    Parameters

    • obj: any

    Returns obj is IDestroyable