Files
directus/packages/sdk
João af13cfe18e Change token and auth handling behavior. (#5203)
* change tokens and authentication handling/refresh

* update sdk docs
2021-04-22 17:54:30 -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
2021-03-30 18:23:23 -04:00
2021-03-30 18:23:23 -04:00

Directus JS SDK

Installation

npm install @directus/sdk

Usage

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

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

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

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

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

Docs

See the docs