Giter Site home page Giter Site logo

dime-scheduler / sdk-js Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 7.17 MB

๐Ÿ“… Dime.Scheduler SDK for JavaScript โš™๏ธ

Home Page: https://docs.dimescheduler.com

License: MIT License

TypeScript 100.00%
sdk dimescheduler nodejs javascript businesscentral erp msdyn365 msdyn365bc planning scheduling

sdk-js's Introduction


Documentation | Changelog | Roadmap

Dime.Scheduler SDK for JavaScript

Supercharge your business by powering up Microsoft Dynamics 365 Business Central with a centralized resource and project planning solution ๐Ÿ“…. Dime.Scheduler, with its powerful features and flexible design, has a proven track record in constious industries and is trusted by dozens of resellers and thousands of people all over the world ๐Ÿš€.

Check out the ๐Ÿ“š docs ยป for more info.

Installation

Use whichever package manager you prefer:

Using npm:

npm install dimescheduler

Using yarn:

yarn add dimescheduler

Using bun:

bun i dimescheduler

Using pnpm:

pnpm add dimescheduler

Example

The sample below shows how to insert or update a category, which is a visual indicator that is used to render the background colors of appointments on the planning board. All you need to do is:

  • Import the Dime.Scheduler client class
  • Import and instantiate the model classes
  • Instantiate the client class with the API key, and optionally, the environment
  • Invoke the import method to enter this object into Dime.Scheduler
import DimeSchedulerClient from 'dimescheduler';
import { Category } from "dimescheduler/models";

const category = new Category();
category.color = '#' + (Math.random() * 0xFFFFFF << 0).toString(16);
category.name = "My category";

const dimeSchedulerClient = new DimeSchedulerClient(apiKey);
const response = await dimeSchedulerClient.import(category);

Usage

Accessing the library

Once the package is installed, you can import the library using import or require approach:

Import:

import DimeSchedulerClient from 'dimescheduler';

Require:

const dimescheduler = require('dimescheduler');

API key

Create an API key in Dime.Scheduler and store it somewhere safely.

Once you have a key, you can instantiate the DimeSchedulerClient class:

const client = new DimeSchedulerClient("My API KEY");

Choose environment

By default, the production environment is used. To use the SDK for the sandbox, you can import the Environment enum:

import DimeSchedulerClient, { Environment } from 'dimescheduler';
const client = new DimeSchedulerClient("My API KEY", Environment.Sandbox);

Models

The models are available in the dimescheduler/models submodule:

Import:

import { Category } from "dimescheduler/models";
const category = new Category();

Require:

const models = require('dimescheduler/models');
const category = new models.Category();

For the complete list of supported models, check out the API docs.

Using the API

For most operations, the import method in the DimeSchedulerClient will suffice. All models in the dimescheduler/models submodule are supported.

To add or update an entry, simply make a call like this:

const category = new Category();
category.color = '#' + (Math.random() * 0xFFFFFF << 0).toString(16);
category.name = "My category";

const response = await dimeSchedulerClient.import(category);

To remove an entry, specify the append argument, which is true by default:

const category = new Category();
category.color = '#' + (Math.random() * 0xFFFFFF << 0).toString(16);
category.name = "My category";

const response = await dimeSchedulerClient.import(category, false);

sdk-js's People

Contributors

hbulens avatar

sdk-js's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.