### Hierarchy

- BaseApi
  - DrupalApi

## 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
- route
- saveLocalResource
- setCredentials

## Constructors

### constructor

- new BaseApi(): BaseApi

- - Defined in base/base-api.ts:15

  #### Returns BaseApi

## Properties

### baseUrl

baseUrl: string = "/api"

- Defined in base/base-api.ts:8

### cachePolicy

cachePolicy: string = "no-cache"

- Defined in base/base-api.ts:12

### corsMode

corsMode: string = "same-origin"

- Defined in base/base-api.ts:11

### credentials

credentials: any

- Defined in base/base-api.ts:13

### entities

entities: any

- Defined in base/base-api.ts:14

### hasDebugger

hasDebugger: boolean = false

- Defined in base/base-api.ts:15

### headers

headers: any

- Defined in base/base-api.ts:5

### idField

idField: string = "id"

- Defined in base/base-api.ts:9

### requestCredentials

requestCredentials: string = "same-origin"

- Defined in base/base-api.ts:10

### routes

routes: object

- Defined in base/base-api.ts:7

#### Type declaration

### settings

settings: any

- Defined in base/base-api.ts:6

## Methods

### clearCredentials

- clearCredentials(namespace?: string): void

- - Defined in base/base-api.ts:166

  #### Parameters

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

  #### Returns void

### delete

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

- - Defined in base/base-api.ts:127

  #### Parameters

  - ##### path: any

  - ##### id: any

  #### Returns Promise<void>

### errorHandler

- errorHandler(error: any): void

- - Defined in base/base-api.ts:189

  #### Parameters

  - ##### error: any

  #### Returns void

### flushLocalResource

- flushLocalResource(ID: any): void

- - Defined in base/base-api.ts:228

  #### Parameters

  - ##### ID: any

  #### Returns void

### get

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

- - Defined in base/base-api.ts:87

  #### Parameters

  - ##### path: string

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

  #### Returns Promise<any>

### getCredentials

- getCredentials(namespace?: string): any

- - Defined in base/base-api.ts:159

  #### Parameters

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

  #### Returns any

### init

- init(settings: any): void

- - Defined in base/base-api.ts:19

  #### Parameters

  - ##### settings: any

  #### Returns void

### initApiRoutes

- initApiRoutes(routes: any): void

- - Defined in base/base-api.ts:172

  #### Parameters

  - ##### routes: any

  #### Returns void

### loadLocalResource

- loadLocalResource(ID: any): void

- - Defined in base/base-api.ts:222

  #### Parameters

  - ##### ID: any

  #### Returns void

### login

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

- - Defined in base/base-api.ts:137

  #### Parameters

  - ##### username: string

  - ##### password: string

  #### Returns void

### logout

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

- - Defined in base/base-api.ts:141

  #### 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 base/base-api.ts:116

  #### Parameters

  - ##### path: any

  - ##### id: any

  - ##### data: any

  #### Returns Promise<void>

### post

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

- - Defined in base/base-api.ts:61

  #### Parameters

  - ##### path: any

  - ##### data: any

  #### Returns Promise<any>

### route

- route(url: string): string

- - Defined in base/base-api.ts:46

  #### Parameters

  - ##### url: string

  #### Returns string

### saveLocalResource

- saveLocalResource(resource: any): void

- - Defined in base/base-api.ts:218

  #### Parameters

  - ##### resource: any

  #### Returns void

### setCredentials

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

- - Defined in base/base-api.ts:151

  #### Parameters

  - ##### credentials: any

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

  #### Returns void