Create Initial ApiClient Class

Created on 12 July 2023, over 1 year ago
Updated 30 August 2023, about 1 year ago

Problem/Motivation

Gotta start somewhere...

We need to create an initial (and bare bones) ApiClient class that we can extend and build upon. This might end up being taken care of or started by way of https://www.drupal.org/project/api_client/issues/3365959 β†’ but this issue can at least be used to validate the requirements for that implementation.

Proposed resolution

The ApiClient class will take the following arguments:
* baseUrl (string)
* options (object)

To start, options will have one property, apiPrefix (string)

The class will also implement an async fetch method, that to start will just be an interface to the default fetch.

It should be possible to both create an instance of the ApiClient class, and also extend it.

Remaining tasks

* Implement the ApiClient class
* Define necessary types
* Document the current ApiClient class inline.
* Add test coverage.

API changes

The ApiClient class will be created.

πŸ“Œ Task
Status

Fixed

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States brianperry

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024