### Hierarchy

- Api
  - JsonApi

## Index

### Constructors

- constructor

### Properties

- baseUrl
- cachePolicy
- corsMode
- credentials
- entities
- hasDebugger
- headers
- idField
- requestCredentials
- routes
- settings

### Methods

- clearCredentials
- delete
- errorHandler
- flushLocalResource
- get
- getCredentials
- init
- initApiRoutes
- loadLocalResource
- login
- logout
- patch
- post
- saveLocalResource
- setCredentials

## Constructors

### constructor

- new Api(): Api

- - Defined in api.ts:42

  #### Returns Api

## Properties

### baseUrl

baseUrl: string = "/api"

- Defined in api.ts:35

### cachePolicy

cachePolicy: string = "no-cache"

- Defined in api.ts:39

### corsMode

corsMode: string = "same-origin"

- Defined in api.ts:38

### credentials

credentials: any

- Defined in api.ts:40

### entities

entities: any

- Defined in api.ts:41

### hasDebugger

hasDebugger: boolean = false

- Defined in api.ts:42

### headers

headers: any

- Defined in api.ts:32

### idField

idField: string = "id"

- Defined in api.ts:36

### requestCredentials

requestCredentials: string = "same-origin"

- Defined in api.ts:37

### routes

routes: object

- Defined in api.ts:34

#### Type declaration

### settings

settings: any

- Defined in api.ts:33

## Methods

### clearCredentials

- clearCredentials(namespace?: string): void

- - Defined in api.ts:178

  #### Parameters

  - ##### Default value namespace: string = "app:authData"

  #### Returns void

### delete

- delete(path: any, id: any): Promise<void>

- - Defined in api.ts:139

  #### Parameters

  - ##### path: any

  - ##### id: any

  #### Returns Promise<void>

### errorHandler

- errorHandler(error: any): void

- - Defined in api.ts:201

  #### Parameters

  - ##### error: any

  #### Returns void

### flushLocalResource

- flushLocalResource(ID: any): void

- - Defined in api.ts:240

  #### Parameters

  - ##### ID: any

  #### Returns void

### get

- get(path: string, params?: any): Promise<any>

- - Defined in api.ts:98

  #### Parameters

  - ##### path: string

  - ##### Default value params: any = undefined

  #### Returns Promise<any>

### getCredentials

- getCredentials(namespace?: string): any

- - Defined in api.ts:171

  #### Parameters

  - ##### Default value namespace: string = "app:authData"

  #### Returns any

### init

- init(settings: any): void

- - Defined in api.ts:46

  #### Parameters

  - ##### settings: any

  #### Returns void

### initApiRoutes

- initApiRoutes(): void

- - Defined in api.ts:184

  #### Returns void

### loadLocalResource

- loadLocalResource(ID: any): void

- - Defined in api.ts:234

  #### Parameters

  - ##### ID: any

  #### Returns void

### login

- login(username: string, password: string): void

- - Defined in api.ts:149

  #### Parameters

  - ##### username: string

  - ##### password: string

  #### Returns void

### logout

- logout(namespace?: string, refresh?: boolean): void

- - Defined in api.ts:154

  #### Parameters

  - ##### Default value namespace: string = "app:authData"

  - ##### Default value refresh: boolean = false

  #### Returns void

### patch

- patch(path: any, id: any, data: any): Promise<void>

- - Defined in api.ts:128

  #### Parameters

  - ##### path: any

  - ##### id: any

  - ##### data: any

  #### Returns Promise<void>

### post

- post(path: any, data: any): Promise<any>

- - Defined in api.ts:72

  #### Parameters

  - ##### path: any

  - ##### data: any

  #### Returns Promise<any>

### saveLocalResource

- saveLocalResource(resource: any): void

- - Defined in api.ts:230

  #### Parameters

  - ##### resource: any

  #### Returns void

### setCredentials

- setCredentials(credentials: any, namespace?: string): void

- - Defined in api.ts:164

  #### Parameters

  - ##### credentials: any

  - ##### Default value namespace: string = "app-auth"

  #### Returns void