Skip to content

boxboat-github-practice/simple-tracker-dotnet-web

Repository files navigation

SimpleTracker.Web - the C# library for the Simple emlpoyee contract tracker api

This API allows management of client contracts and tracks history of employee contract assignments

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • SDK version: 1.0.0
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following command to generate the DLL

  • [Mac/Linux/Windows] dotnet build

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using SimpleTracker.Web.Api;
using SimpleTracker.Web.Client;
using SimpleTracker.Web.Model;

Getting Started

using System.Collections.Generic;
using System.Diagnostics;
using SimpleTracker.Web.Api;
using SimpleTracker.Web.Client;
using SimpleTracker.Web.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration.Default.BasePath = "http://localhost";
            var apiInstance = new DefaultApi(Configuration.Default);
            var clientId = 56;  // int | Numeric ID of the client

            try
            {
                // Delete a client by ID
                apiInstance.ClientsClientIdDelete(clientId);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DefaultApi.ClientsClientIdDelete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
DefaultApi ClientsClientIdDelete DELETE /clients/{clientId} Delete a client by ID
DefaultApi ClientsClientIdGet GET /clients/{clientId} Get a client by ID
DefaultApi ClientsClientIdPut PUT /clients/{clientId} Update a client by ID
DefaultApi ClientsGet GET /clients Get all clients
DefaultApi ClientsPost POST /clients Create new client
DefaultApi ContractsContractIdDelete DELETE /contracts/{contractId} Delete a contract by ID
DefaultApi ContractsContractIdGet GET /contracts/{contractId} Get a contract by ID
DefaultApi ContractsContractIdPut PUT /contracts/{contractId} Update a contract by ID
DefaultApi ContractsGet GET /contracts Get all contracts
DefaultApi ContractsPost POST /contracts Create new contract
DefaultApi EmployeesEmployeeIdDelete DELETE /employees/{employeeId} Delete an employee by ID
DefaultApi EmployeesEmployeeIdGet GET /employees/{employeeId} Get an employee by ID
DefaultApi EmployeesEmployeeIdPut PUT /employees/{employeeId} Update an employee by ID
DefaultApi EmployeesGet GET /employees Get all employees
DefaultApi EmployeesPost POST /employees Create new employee
DefaultApi HistoryGet GET /history Get all history
DefaultApi HistoryHistoryIdDelete DELETE /history/{historyId} Delete an employee contract assignment by ID
DefaultApi HistoryHistoryIdGet GET /history/{historyId} Get an employee contract asignment by ID
DefaultApi HistoryHistoryIdPut PUT /history/{historyId} Update an employee contract assignment by ID
DefaultApi HistoryPost POST /history Create new employee contract assignment

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

Releases

No releases published

Packages

No packages published

Languages