Directus Api Package
🧑🍳 What is Directus API?
Introduction
The internal @tanglemedia Directus API package is responsible for, creating services for your Directus API calls that at the end makes those calls closer to what a Fetch call would look like, that we recommend using as much as possible in your SvelteKit projects, since it makes the development of those directus API calls so much faster and easier to maintain.
Services
Services is a simple abstraction layer that makes some assumptions around common api requests and responses. Sevices rely on an underlying adapter which is responsible for transforming the request/response payloads and handling the actual requests to an api. Once you have that you can create different services to handle different collections of your Directus project, here I am going to show three different services examples: