### Hierarchy

- Api
  - 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 Api.constructor

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

  #### Returns DrupalApi

## Properties

### baseUrl

baseUrl: string = "/api"

Inherited from Api.baseUrl

- Defined in api.ts:32

### cache

cache: boolean = false

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

### cachePolicy

cachePolicy: string = "no-cache"

Inherited from Api.cachePolicy

- Defined in api.ts:36

### collections

collections: object

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

#### Type declaration

### corsMode

corsMode: string = "same-origin"

Inherited from Api.corsMode

- Defined in api.ts:35

### credentials

credentials: any

Inherited from Api.credentials

- Defined in api.ts:37

### entities

entities: object

Overrides Api.entities

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

#### Type declaration

### hasDebugger

hasDebugger: boolean = false

Inherited from Api.hasDebugger

- Defined in api.ts:39

### headers

headers: any

Inherited from Api.headers

- Defined in api.ts:29

### idField

idField: string = "id"

Inherited from Api.idField

- Defined in api.ts:33

### 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 Api.requestCredentials

- Defined in api.ts:34

### resources

resources: any

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

### routes

routes: object

Inherited from Api.routes

- Defined in api.ts:31

#### Type declaration

### settings

settings: any

Inherited from Api.settings

- Defined in api.ts:30

### views

views: object

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

#### Type declaration

## Methods

### clearCredentials

- clearCredentials(namespace?: string): void

- Inherited from Api.clearCredentials

  - Defined in api.ts:191

  #### Parameters

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

  #### Returns void

### delete

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

- Overrides Api.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 Api.errorHandler

  - Defined in api.ts:214

  #### Parameters

  - ##### error: any

  #### Returns void

### flushLocalResource

- flushLocalResource(ID: any): void

- Inherited from Api.flushLocalResource

  - Defined in api.ts:253

  #### Parameters

  - ##### ID: any

  #### Returns void

### get

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

- Inherited from Api.get

  - Defined in api.ts:111

  #### 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:340

  #### Parameters

  - ##### entity_id: string

  #### Returns object

  - ##### data: any

### getByNodeId

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

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

  #### 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 Api.getCredentials

  - Defined in api.ts:184

  #### 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 Api.init

  - Defined in api.ts:43

  #### Parameters

  - ##### settings: any

  #### Returns void

### initApiRoutes

- initApiRoutes(routes: any): void

- Inherited from Api.initApiRoutes

  - Defined in api.ts:197

  #### Parameters

  - ##### routes: any

  #### Returns void

### loadLocalResource

- loadLocalResource(ID: any): void

- Inherited from Api.loadLocalResource

  - Defined in api.ts:247

  #### Parameters

  - ##### ID: any

  #### Returns void

### login

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

- Inherited from Api.login

  - Defined in api.ts:162

  #### Parameters

  - ##### username: string

  - ##### password: string

  #### Returns void

### logout

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

- Inherited from Api.logout

  - Defined in api.ts:167

  #### 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 Api.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 Api.post

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

  #### Parameters

  - ##### path: any

  - ##### object: any

  #### Returns Promise<void>

### route

- route(url: string): string

- Inherited from Api.route

  - Defined in api.ts:70

  #### Parameters

  - ##### url: string

  #### Returns string

### saveLocalResource

- saveLocalResource(resource: any): void

- Inherited from Api.saveLocalResource

  - Defined in api.ts:243

  #### 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 Api.setCredentials

  - Defined in api.ts:177

  #### Parameters

  - ##### credentials: any

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

  #### Returns void