You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

@drupal-api-client/api-client

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@drupal-api-client/api-client

This package contains the base class for the Drupal API Client.

1.3.0
latest
Version published
Weekly downloads
33
-36.54%
Maintainers
0
Weekly downloads
 
Created

api-client

This package contains the base class for the Drupal API Client. For more information, see https://www.drupal.org/project/api_client for more information about this project.

Installation

npm install @drupal-api-client/api-client

Usage

The ApiClient is a base class meant to be extended. The base class includes the following parameters:

  • BaseUrl: The url to use for all API requests
  • apiPrefix: The base path for the JSON:API endpoint
  • cache: An optional caching interface
  • customFetch: An optional method to use in place of the default fetch method
  • authentication: Optional credentials for authenticated requests
  • defaultLocale: An optional locale to use for requests by default.

For an example of an extended ApiClient, see JsonApiClient

Keywords

FAQs

Package last updated on 20 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts