Files
directus/packages/sdk
Jürg Hunziker a7f79a1761 [SDK] Add further request options to items functions (#12503)
* add possibility to set further options to the request

* fix options type

* add typings to interface

* add test if headers are passed thourght

* create reusable options param

* set higher priority to options param
2022-03-31 14:06:52 -04:00
..
2021-03-30 18:23:23 -04:00
2021-03-30 18:23:23 -04:00
2021-03-30 18:23:23 -04:00
2021-03-30 18:23:23 -04:00
2022-03-23 14:50:51 -04:00
2021-11-04 13:30:30 -04:00

Directus JS SDK

Installation

npm install @directus/sdk

Usage

import { Directus } from '@directus/sdk';

const directus = new Directus('http://directus.example.com');

const items = await directus.items('articles').readOne(15);
console.log(items);
import { Directus } from '@directus/sdk';

const directus = new Directus('http://directus.example.com');

directus
	.items('articles')
	.readOne(15)
	.then((item) => {
		console.log(item);
	});

Docs

See the docs