Giter VIP home page Giter VIP logo

matteotrombin / api-csharp Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 522 KB

Deepser API Guide: Integrate Deepser's help desk software effortlessly. Use Deepser.dll for installation, add references, and follow simple steps. Manage entities like Operation (Ticket), User, and Company with ease. Perform actions like loading, creating, updating, and deleting effortlessly. Elevate your project with this concise API guide. ๐Ÿ› ๏ธโœจ

C# 100.00%

api-csharp's Introduction

Deepser API

This is a guide for consuming the Deepser API - a help desk software. More information can be found in the Deepser API Docs.

Installation

This is a quick guide to using the Deepser library within your project, follow these steps:

  1. Download the Deepser.dll file from the repository.

  2. In Visual Studio, right-click on the "References" menu in the Solution Explorer and select "Add Reference".

  3. In the dialog box, locate the downloaded Deepser.dll file and add it as a reference.

  4. Add the Deepser namespace to your code using the "using" directive.

  5. Install the Newtonsoft.Json NuGet package in your project. To do this, go to the "Manage NuGet Packages" menu, search for "Newtonsoft.Json," and install the package.

  6. Make sure the package has been added to your project's references along with Deepser.dll.

Once these steps are complete, you will be able to access the methods and classes defined in Deepser.dll in your code.

Example

Login with Basic Authentication

string host = "https://your.deepser.net";
string username = "username";
string password = "password";
Authentication auth = new Authentication(host, username, password);

Login with Token Based Authentication

string host = "https://your.deepser.net";
string token = "mytokenhere";
Authentication auth = new Authentication(host, token);

Factory

Factory fact = new Factory();

//create new instances of the various entities using the factory pattern
var comp = fact.CreateEntity("Company");
var op = fact.CreateEntity("Operation");
var user = fact.CreateEntity("User");

Operation (Ticket)

// load an existing operation by id
var result = await op.Load(5413);

// get the data from the operation I loaded
result.getData("description");

// create new operation object
op.setData("type_id", 1)
  .setData("title", "iPhone 13")
  .setData("category1", 17)
  .setData("description", "Description")
  .setData("priority_id", 1)
  .setData("urgency_id", 1)
  .setData("status", 1);
var result = await op.Create();

// get the data from the operation I created
op.getData("entity_id");

// update an operation
op.setData("title", "NewTitle");
op.Update("OldTitle", "title");

// get the data from the operation I updated
op.getData("title");

// delete by id 
await op.Delete(5396);

// delete by attribute
await op.Delete("NewTicket", "title");

User

// load an existing user by id
var result = await user.Load(48);

// get the data from the user I loaded
result.getData("username"); 

// load user collection

// set up collection for the user entity
Collection collection = new Collection();
collection.SetMainModel(typeof(User));

// add filter
var filter = collection.GetFilter();
filter.addFilter("username", EqualTo, "admin");

// load collection
await collection.LoadMultiple();
var items = collection.GetCollection();
foreach (var item in items)
{
    $"{item.Key} : {item.Value}";
}

Company

// load an existing operation by id
await comp.Load(2);

// load company collection

// set up collection for the company entity
Collection collection = new Collection();
collection.SetMainModel(typeof(Company));

// add filter
var filter = collection.GetFilter();
filter.addFilter("name", Like, "ACME%");

// add parameter
var parameter = collection.GetParameter();
parameter.SetOrder("entity_id", Parameter.Ascending);

// load collection
await collection.LoadMultiple();
var items = collection.GetCollection();
foreach (var item in items)
{
    $"{item.Key} : {item.Value}";
}

Credits

Support

Please open an issue in github

Conclusion

The Deepser API is a helpful tool for building and managing help desk software. By following the above examples, you can consume the Deepser API and build your own customized applications.

api-csharp's People

Contributors

matteotrombin avatar

Watchers

 avatar

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.