Giter VIP home page Giter VIP logo

sdk-dotnet's Introduction

Documentation | Changelog | Roadmap

Dime.Scheduler SDK for .NET

This repository contains the .NET SDK for Dime.Scheduler's. The SDK is a gateway to connect any system to Dime.Scheduler through its extensive import pipeline and large collection of web APIs.

Installation

Use the package manager NuGet to install the SDK:

dotnet add package Dime.Scheduler

Important

Version 2 and onwards is only forwards compatible with Dime.Scheduler cloud. The Dime.Scheduler.Sdk package is maintained for the on-premises version.

Prerequisites

To clone and run this application, you'll need Visual Studio 2022 or higher. It is built on the latest versions of .NET and C#.

Usage

The DimeSchedulerClient class is the entry point and it is where all endpoints are exposed:

DimeSchedulerClient client = new("key");

Tip

An optional argument is available to use the sandbox environment.

Instantiate the object of choice and run it by its corresponding endpoint in the SDK.

Category category = new("Category #1", "#6e62b5");
await client.Categories.CreateAsync(category);

Read more

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

Contributing

We welcome contributions. Please check out the contribution and code of conduct guidelines first.

To contribute:

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/mynewfeature)
  3. Commit your changes (git commit -m 'Add mynewfeature')
  4. Push to the branch (git push origin feature/mynewfeature)
  5. Open a pull request

sdk-dotnet's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar hbulens avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

gitter-badger

sdk-dotnet's Issues

Import requests

Description

Add a layer on top of the import API to make import requests easier to use. At the moment, requests are defined as follows:

ImportRequest importRequest = new ImportRequest(
  "mboc_upsertCategory",
  new List<string> { "Name", "Color" }.ToArray(),
  new List<string> { "Category #1","#6e62b5" }.ToArray()
);

This is overly complex and unnecessary. Therefore, the following actions are recommended:

  • Do not expose stored procedure names
  • Dedicated parameters with appropriate types
  • Add validation to the mix

Import endpoints

  • mboc_addAppointmentResource
  • mboc_clearResourceFilterValue
  • mboc_clearTaskFilterValue
  • mboc_deleteAppointment
  • mboc_deleteAppointmentContainer
  • mboc_deleteCategory
  • mboc_deleteContainer
  • mboc_deleteExchangeAppointment
  • mboc_deleteFilterGroup
  • mboc_deleteFilterValue
  • mboc_deleteJob
  • mboc_deleteNotification
  • mboc_deletePin
  • mboc_deleteResourceCalendar
  • mboc_deleteResourceCertificate
  • mboc_deleteResourceFilterValue
  • mboc_deleteTask
  • mboc_deleteTaskContainer
  • mboc_deleteTaskFilterValue
  • mboc_deleteTimeMarker
  • mboc_updateAppointmentCategory
  • mboc_updateAppointmentContent
  • mboc_updateAppointmentImportance
  • mboc_updateAppointmentLocked
  • mboc_updateAppointmentPlanningQty
  • mboc_updateAppointmentTimeMarker
  • mboc_updateTaskLocked
  • mboc_upsertActionUrl
  • mboc_upsertAppointment
  • mboc_upsertAppointmentContainer
  • mboc_upsertAppointmentUrl
  • mboc_upsertCaption
  • mboc_upsertCategory
  • mboc_upsertContainer
  • mboc_upsertExchangeAppointment
  • mboc_upsertFilterGroup
  • mboc_upsertFilterValue
  • mboc_upsertJob
  • mboc_upsertNotification
  • mboc_upsertPin
  • mboc_upsertResource
  • mboc_upsertResourceCalendar
  • mboc_upsertResourceCapacity
  • mboc_upsertResourceCertificate
  • mboc_upsertResourceFilterValue
  • mboc_upsertResourceGpsTracking
  • mboc_upsertResourceUrl
  • mboc_upsertTask
  • mboc_upsertTaskContainer
  • mboc_upsertTaskFilterValue
  • mboc_upsertTaskUrl
  • mboc_upsertTimeMarker

Simplify endpoint services

Remove duplicate parameters and reuse URI and authentication token in the authenticator and endpoint service.

string uri = "http://localhost:53006/";
DimeSchedulerClient client = new(uri);
await client.Authenticate("[email protected]", "Password123");

ImportRequest importRequest = new(
    "mboc_upsertExchangeAppointment",
    new List<string>{}.ToArray(),
    new List<string>{}.ToArray())
{
    Uri = uri, // Already available so should not declare twice
    AuthenticationToken = client.AuthenticationToken // Already available so should not declare twice
};

Furthermore, find a more elegant solution IRequestParameter constraint in the abstract EndpointService<TRequest> class.

Import property name attribute

Use attributes on the import class properties to define

  1. Whether they are to be passed to the Dime.Scheduler pipeline
  2. Which parameter name should be used

Instead of hard coding the property names, use these attributes to compose the import request.

URL builder

Right now the URI must be constructed perfectly. The base URI must end with a / or otherwise, it won't work. Parse the incoming string and construct the URI.

Filter and sorter builders

Create a generic filter builder that generates Ext filter strings.
A fluent API would be a user-friendly solution.

string filter = Filter
.WithOperator(Operators.Eq)
.WithValue<bool>(true)
.WithProperty<Resource>(x => x.ExchangeIntegrationEnabled)
.Create();

The above pseudo-code should be capable of creating a filter string that can be parsed by the Ext filter framework:
[{ 'operator':'==','value':true,'property':'ExchangeIntegrationEnabled'}]

Would be a nice addition to the Dime.Scheduler .NET SDK. The same counts for sorters.

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.