### Hierarchy

- BaseApi
  - DrupalApi

## Index

### Constructors

- constructor

### Properties

- baseUrl
- cache
- cachePolicy
- collections
- corsMode
- credentials
- entities
- hasDebugger
- headers
- idField
- language
- nodes
- requestCredentials
- resources
- routes
- settings
- views

### Methods

- clearCredentials
- delete
- deleteNode
- errorHandler
- flushLocalResource
- get
- getAllCollections
- getById
- getByNodeId
- getCollection
- getCollections
- getCredentials
- getEntityRelationships
- getNode
- getNodes
- getResource
- getResources
- getResourcesIndex
- init
- initApiRoutes
- loadLocalResource
- login
- logout
- patch
- post
- route
- saveLocalResource
- saveNode
- setCredentials

## Constructors

### constructor

- new DrupalApi(): DrupalApi

- Overrides BaseApi.constructor

  - Defined in cms/drupal/drupal-api.ts:13

  #### Returns DrupalApi

## Properties

### baseUrl

baseUrl: string = "/api"

Inherited from BaseApi.baseUrl

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

### cache

cache: boolean = false

- Defined in cms/drupal/drupal-api.ts:12

### cachePolicy

cachePolicy: string = "no-cache"

Inherited from BaseApi.cachePolicy

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

### collections

collections: object

- Defined in cms/drupal/drupal-api.ts:8

#### Type declaration

### corsMode

corsMode: string = "same-origin"

Inherited from BaseApi.corsMode

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

### credentials

credentials: any

Inherited from BaseApi.credentials

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

### entities

entities: object

Overrides BaseApi.entities

- Defined in cms/drupal/drupal-api.ts:7

#### Type declaration

### hasDebugger

hasDebugger: boolean = false

Inherited from BaseApi.hasDebugger

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

### headers

headers: any

Inherited from BaseApi.headers

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

### idField

idField: string = "id"

Inherited from BaseApi.idField

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

### language

language: string

- Defined in cms/drupal/drupal-api.ts:13

### nodes

nodes: object

- Defined in cms/drupal/drupal-api.ts:9

#### Type declaration

### requestCredentials

requestCredentials: string = "same-origin"

Inherited from BaseApi.requestCredentials

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

### resources

resources: any

- Defined in cms/drupal/drupal-api.ts:10

### routes

routes: object

Inherited from BaseApi.routes

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

#### Type declaration

### settings

settings: any

Inherited from BaseApi.settings

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

### views

views: object

- Defined in cms/drupal/drupal-api.ts:11

#### Type declaration

## Methods

### clearCredentials

- clearCredentials(namespace?: string): void

- Inherited from BaseApi.clearCredentials

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

  #### Parameters

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

  #### Returns void

### delete

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

- Overrides BaseApi.delete

  - Defined in cms/drupal/drupal-api.ts:49

  #### Parameters

  - ##### path: any

  - ##### id: any

  #### Returns Promise<void>

### deleteNode

- deleteNode(node: any): Promise<void>

- - Defined in cms/drupal/drupal-api.ts:317

  #### Parameters

  - ##### node: any

  #### Returns Promise<void>

### errorHandler

- errorHandler(error: any): void

- Inherited from BaseApi.errorHandler

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

  #### Parameters

  - ##### error: any

  #### Returns void

### flushLocalResource

- flushLocalResource(ID: any): void

- Inherited from BaseApi.flushLocalResource

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

  #### Parameters

  - ##### ID: any

  #### Returns void

### get

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

- Inherited from BaseApi.get

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

  #### Parameters

  - ##### path: string

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

  #### Returns Promise<any>

### getAllCollections

- getAllCollections(getRelationships?: boolean, exclude?: any[]): Promise<void>

- - Defined in cms/drupal/drupal-api.ts:127

  #### Parameters

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

  - ##### Default value exclude: any[] = []

  #### Returns Promise<void>

### getById

- getById(entity_id: string): object

- - Defined in cms/drupal/drupal-api.ts:338

  #### Parameters

  - ##### entity_id: string

  #### Returns object

### getByNodeId

- getByNodeId(nid: any): Promise<object>

- - Defined in cms/drupal/drupal-api.ts:355

  #### Parameters

  - ##### nid: any

  #### Returns Promise<object>

### getCollection

- getCollection(collectionId: string, params?: any, getRelationships?: boolean): Promise<any>

- - Defined in cms/drupal/drupal-api.ts:97

  #### Parameters

  - ##### collectionId: string

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

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

  #### Returns Promise<any>

### getCollections

- getCollections(collectionIds: any[], params?: any, getRelationships?: boolean): Promise<void>

- - Defined in cms/drupal/drupal-api.ts:117

  #### Parameters

  - ##### collectionIds: any[]

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

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

  #### Returns Promise<void>

### getCredentials

- getCredentials(namespace?: string): any

- Inherited from BaseApi.getCredentials

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

  #### Parameters

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

  #### Returns any

### getEntityRelationships

- getEntityRelationships(entity: any): Promise<any>

- - Defined in cms/drupal/drupal-api.ts:186

  #### Parameters

  - ##### entity: any

  #### Returns Promise<any>

### getNode

- getNode(id: any, type?: string): Promise<any>

- - Defined in cms/drupal/drupal-api.ts:219

  #### Parameters

  - ##### id: any

  - ##### Default value type: string = undefined

  #### Returns Promise<any>

### getNodes

- getNodes(ids: any[]): Promise<void>

- - Defined in cms/drupal/drupal-api.ts:298

  #### Parameters

  - ##### ids: any[]

  #### Returns Promise<void>

### getResource

- getResource(url: string, params?: any): Promise<any>

- - Defined in cms/drupal/drupal-api.ts:145

  #### Parameters

  - ##### url: string

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

  #### Returns Promise<any>

### getResources

- getResources(urls: any[]): Promise<void>

- - Defined in cms/drupal/drupal-api.ts:175

  #### Parameters

  - ##### urls: any[]

  #### Returns Promise<void>

### getResourcesIndex

- getResourcesIndex(jsonapi_endpoint?: string, language?: string): Promise<void>

- - Defined in cms/drupal/drupal-api.ts:61

  #### Parameters

  - ##### Default value jsonapi_endpoint: string = "jsonapi"

  - ##### Default value language: string = undefined

  #### Returns Promise<void>

### init

- init(settings: any): void

- Inherited from BaseApi.init

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

  #### Parameters

  - ##### settings: any

  #### Returns void

### initApiRoutes

- initApiRoutes(routes: any): void

- Inherited from BaseApi.initApiRoutes

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

  #### Parameters

  - ##### routes: any

  #### Returns void

### loadLocalResource

- loadLocalResource(ID: any): void

- Inherited from BaseApi.loadLocalResource

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

  #### Parameters

  - ##### ID: any

  #### Returns void

### login

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

- Inherited from BaseApi.login

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

  #### Parameters

  - ##### username: string

  - ##### password: string

  #### Returns void

### logout

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

- Inherited from BaseApi.logout

  - 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, object: any): Promise<void>

- Overrides BaseApi.patch

  - Defined in cms/drupal/drupal-api.ts:34

  #### Parameters

  - ##### path: any

  - ##### id: any

  - ##### object: any

  #### Returns Promise<void>

### post

- post(path: any, object: any): Promise<void>

- Overrides BaseApi.post

  - Defined in cms/drupal/drupal-api.ts:23

  #### Parameters

  - ##### path: any

  - ##### object: any

  #### Returns Promise<void>

### route

- route(url: string): string

- Inherited from BaseApi.route

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

  #### Parameters

  - ##### url: string

  #### Returns string

### saveLocalResource

- saveLocalResource(resource: any): void

- Inherited from BaseApi.saveLocalResource

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

  #### Parameters

  - ##### resource: any

  #### Returns void

### saveNode

- saveNode(node: any): Promise<void>

- - Defined in cms/drupal/drupal-api.ts:308

  #### Parameters

  - ##### node: any

  #### Returns Promise<void>

### setCredentials

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

- Inherited from BaseApi.setCredentials

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

  #### Parameters

  - ##### credentials: any

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

  #### Returns void