Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

directus-sdk-javascript

Package Overview
Dependencies
Maintainers
3
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directus-sdk-javascript

WIP - Directus SDK for JavaScript (Node and Browser)

  • 1.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
27
decreased by-12.9%
Maintainers
3
Weekly downloads
 
Created
Source

directus-sdk-javascript

WIP - Directus SDK for JavaScript (Node and Browser)

Directus Logo

NPM

Installation and Usage

Install the package via npm npm install directus-sdk-javascript

Initialize the SDK object with your the desired api key and url

const SDK = require('directus-sdk-javascript');

const client = new SDK(
  'api-key-12345',
  'http://directus.url/api/', // Directus-hosted or own server
  1.1 // API Version
);

All methods can be used with either callbacks or promises.

client.getEntries('projects', (err, res) => {
  if(err) throw err;
  console.log(res);
});
client.getEntries('projects')
  .then(res => {
    console.log(res);
  })
  .catch(err => {
    throw err;
  });

Check the official API docs for a complete overview of all endpoints and available methods

Keywords

FAQs

Package last updated on 23 Feb 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc