This is a guide for consuming the Deepser API - a help desk software. More information can be found in the Deepser API Docs.
This is a quick guide to using the Deepser library within your project, follow these steps:
-
Download the Deepser.dll file from the repository.
-
In Visual Studio, right-click on the "References" menu in the Solution Explorer and select "Add Reference".
-
In the dialog box, locate the downloaded Deepser.dll file and add it as a reference.
-
Add the Deepser namespace to your code using the "using" directive.
-
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.
-
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.
string host = "https://your.deepser.net";
string username = "username";
string password = "password";
Authentication auth = new Authentication(host, username, password);
string host = "https://your.deepser.net";
string token = "mytokenhere";
Authentication auth = new Authentication(host, token);
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");
// 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");
// 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}";
}
// 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}";
}
Please open an issue in github
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.