RaptorLoggerEngine.Gig 1.0.0

dotnet add package RaptorLoggerEngine.Gig --version 1.0.0                
NuGet\Install-Package RaptorLoggerEngine.Gig -Version 1.0.0                
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="RaptorLoggerEngine.Gig" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RaptorLoggerEngine.Gig --version 1.0.0                
#r "nuget: RaptorLoggerEngine.Gig, 1.0.0"                
#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 RaptorLoggerEngine.Gig as a Cake Addin
#addin nuget:?package=RaptorLoggerEngine.Gig&version=1.0.0

// Install RaptorLoggerEngine.Gig as a Cake Tool
#tool nuget:?package=RaptorLoggerEngine.Gig&version=1.0.0                

RaptorLoggerEngine

Badge Name Status
Latest Build Status build status
RLE.Gig Nuget Version Nuget

Project Description

This project is a library used to handle the interactions between a custom API service and Google Sheets API. It offers the following features:

  • Appending data to trips and shifts sheets
  • Creating, formatting, and styling all sheets in the worksheet.
  • Getting data from all the sheets in the worksheet (individually, group, and batch)
  • Getting worksheet properties like title and sheet tab names

Using Library

Auth Modes

To authenticate you can use either of the following:

Simple

Using the GoogleSheetManager allows you to skip referencing Google.Apis.Sheets.v4 package and just call the functions and receive data with common objects.

Create a new instance of the GoogleSheetManager with auth mode and spreadsheet id

var googleSheetManager = new GoogleSheetManager(authMode, spreadsheetId);

You can create all sheets, formats, and layouts in a new worksheet by calling CreateSheets()

await googleSheetManager.CreateSheets();

You can get all sheets and information by calling GetSheets()

var data = await googleSheetManager.GetSheets();

You can retrieve specific sheets and information by calling GetSheets() and passing in the sheet enums you want.

var sheets = [SheetEnum.Trips, SheetEnum.Shifts]
var data = await googleSheetManager.GetSheets(sheets);

Advanced

Using the GoogleSheetService allows you to change format, colors, and other options by referencing the Google.Apis.Sheets.v4 package.

Testing

Create Service Account

You'll need to create your own service account and use the credentials to access your Google Sheet:

Local Setup

Add Google JSON Credentials by right clicking on RaptorLoggerEngine.tests and selecting Manage User Secrets (secrets.json)

Add the following JSON properties to it:

{
  "google_credentials": {
    "type": "service_account",
    "private_key_id": "",
    "private_key": "",
    "client_email": "",
    "client_id": "",
  },
  "spreadsheet_id": ""
}

Create a new spreadsheet and add the service account/client email to it.

Update the user secrets with the spreadsheeet id.

Once that is completed you'll be able to run all tests including integration tests.

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.

Version Downloads Last updated
1.0.0 119 9/28/2024