GithubHelp home page GithubHelp logo

teamdynamixlib's Introduction

TeamDynamixLib

Library of TeamDynamix function calls to make my life easier. I will continue to update this project as time permits. https://github.com/clstr/TeamDynamixLib

Dependencies

  • DotNet Core 2.1
  • RestSharp
  • Newtonsoft Json.NET
  • TeamDynamix.API

This project does not come with the TeamDynamix API DLL, you will need the TeamDynamix API Library for these functions to work. You can obtain these in TDNext > Downloads > TeamDynamix API .DLL (.NET 4.5.2) .

To build the project

dotnet build

You can always add the project sln to your existing solution

To install as a Nuget package

Install from nuget.org https://www.nuget.org/packages/TeamDynamixLib/

Example Usage

public static async Task Main(string[] args) {
    Console.WriteLine("Hello World!");

    TDXEnvironment tDXEnvironment = new TDXEnvironment {
        ClientUrl = "https://yourSchool.teamDynamix.com/",
        IsSandboxEnvironment = true
    };

    AdminTokenParameters adminTokenParameters = new AdminTokenParameters {
        BEID = Guid.Parse("00000000-0000-0000-0000-000000000000"),
        WebServicesKey = Guid.Parse("00000000-0000-0000-0000-000000000000")
    };

    AuthenticationLib authenticationLib = new AuthenticationLib();
    var JWT = await authenticationLib.GetAuthHeaderAsync(adminTokenParameters, tDXEnvironment);

    TicketLib ticketLib = new TicketLib();
    var ticketDetailsExample1 = await ticketLib.GetTicketAsync(9280401, 431, JWT, tDXEnvironment);
    var ticketDetailsExample2 = await ticketLib.GetTicketAsync(696969, 500, JWT, tDXEnvironment);
    
    PeopleLib peopleLib = new PeopleLib();
    var personDetailsExample1 = await peopleLib.GetPersonByUIDAsync(
        Guid.Parse("00000000-0000-0000-0000-000000000000"), 
        JWT, tDXEnvironment
    );
    
    Ticket ticket = new Ticket() {
        TypeID = 20999,
        Title = "(TEST API IGNORE) Install IIS Latest Version",
        AccountID = 48319,
        StatusID = 17950,
        PriorityID = 3371,
        RequestorUid = Guid.Parse("00000000-0000-0000-0000-000000000000")
    };

    TicketCreateOptions ticketCreateOptions = new TicketCreateOptions() {
        EnableNotifyReviewer = false,
        NotifyRequestor = false,
        NotifyResponsible = false,
        AllowRequestorCreation = false
    };

    var myTicket = await ticketLib.CreateTicketAsync(
        ticket, 431, ticketCreateOptions,
        JWT, tDXEnvironment
    );
}

Note: To run the example above you will need to set your project to use C# version 7.1+ since I am using async in the main function. http://techxposer.com/2017/11/18/enable-c-7-1-projects/

You only need to call GetAuthHeaderAsync() once to get the Json Web Token (JWT), which can be used until it expires. This means you can use the same JWT for all other TDX requests using the same token. https://jwt.io/

What is implemented?

So far i have the following tdx endpoints implemented according to the API Documentation https://solutions.teamdynamix.com/TDWebApi/

Auth

People

Tickets

teamdynamixlib's People

Contributors

clstr avatar dependabot[bot] avatar

Watchers

Lucas Schill 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.