CRDevelopment.BambooNET 0.1.10

Additional Details

This package is development and should not be used

There is a newer version of this package available.
See the version list below for details.
dotnet add package CRDevelopment.BambooNET --version 0.1.10                
NuGet\Install-Package CRDevelopment.BambooNET -Version 0.1.10                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CRDevelopment.BambooNET" Version="0.1.10" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CRDevelopment.BambooNET --version 0.1.10                
#r "nuget: CRDevelopment.BambooNET, 0.1.10"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CRDevelopment.BambooNET as a Cake Addin
#addin nuget:?package=CRDevelopment.BambooNET&version=0.1.10

// Install CRDevelopment.BambooNET as a Cake Tool
#tool nuget:?package=CRDevelopment.BambooNET&version=0.1.10                

BambooNET

BambooNET

A .NET client library for the BambooHR API.


License  Version  Downloads 

Open Issues  Open Pull Requests  Last Commit 

Dependabot  CodeQL  GitHub Sponsors 


Table of Contents

Usage

static readonly string COMPANY_SUBDOMAIN = "yourcompany";
static readonly string API_KEY = "YourBamb00HRAPIKey";

static readonly int BAMBOO_ID = 123;
static readonly DateTime START_DATE = new(2024, 11, 30);
static readonly DateTime END_DATE = new(2024, 12, 13);

try
{
  var bambooClient = new BambooClient(COMPANY_SUBDOMAIN, API_KEY);

  var timesheets = await bambooClient.TimeTracking.GetTimesheetEntriesAsync(START_DATE, END_DATE);
  Console.WriteLine($"TimeTracking.GetTimesheetEntriesAsync Results: {timesheets.Count}");

  var requests = await bambooClient.TimeOff.GetRequestsAsync(START_DATE, END_DATE);
  Console.WriteLine($"TimeOff.GetRequestsAsync Results: {requests.Count}");

  var whosout = await bambooClient.TimeOff.GetWhosOutAsync(START_DATE, END_DATE);
  Console.WriteLine($"TimeOff.GetWhosOutAsync Results: {whosout.Count}");

  var employeedata = await bambooClient.Employees.GetEmployeeDataAsync(BAMBOO_ID);
  Console.WriteLine($"Employees.GetEmployeeDataAsync Results: {employeedata.FirstName} {employeedata.LastName}");

  var ex_employeedata = await bambooClient.Employees.GetEmployeeDataAsync<ExtendedEmployeeData>(BAMBOO_ID);
  Console.WriteLine($"Employees.GetEmployeeDataAsync Results: {ex_employeedata.FirstName} {ex_employeedata.LastName}, Hours: {ex_employeedata.HoursPerWeek}");

  var tabledata = await bambooClient.Employees.GetTabularDataAsync<JobInfoData>(BAMBOO_ID, "jobInfo");
  Console.WriteLine($"Employees.GetTabularDataAsync Results: {tabledata.Count}");

  var dataset = await bambooClient.Datasets.GetDatasetDataAsync<ExtendedEmployeeData>("employee",
    new(FiltersMatch.ANY,
    [
      new("hireDate", FilterOperator.GreaterThanOrEqual, START_DATE.ToString(bambooClient.DateFormat))
    ]),
    [
      new("hireDate", SortDirection.DESC),
      new("lastName", SortDirection.ASC),
      new("firstName", SortDirection.ASC)
    ]
  );
  Console.WriteLine($"Datasets.GetDatasetData Results: {dataset.Count}");
}
catch (Exception ex)
{
  Console.WriteLine(ex.ToString());
}

Reference

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior.
For more information see the Code of Conduct.

Issues / Support

See SECURITY.md for feature requests or bug reports.

Contributing

See CONTRIBUTING.md for more information.

Author

CRDevel

Craig Roberts
GitHub Discord Telegram

License

Copyright © 2024 CR Development. Licensed under the MIT license.
See LICENSE.md or https://opensource.org/license/mit for more details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.