Is it possible to install 3rd party packages/APIs?

Posts: 100
Might be a bit of a reach, but I'm working on a system to allow Race Control to send live updates through a google form. I wrote a console application to read off of the google sheets document that form generates. My question - how can I, or is it possible to, install the sheets/drive API into ATVO so that the references are all referenced?


using Google.Apis.Auth.OAuth2;
using Google.Apis.Sheets.v4;
using System;
using System.IO;

namespace SYMTVRaceControl
{
class Program
{
static readonly string[] Scopes = { SheetsService.Scope.Spreadsheets };

static readonly string ApplicationName = "SYMTVRaceControl Comms";

static readonly string SpreadsheetId = "1i4JUeXF-IbC-jD_Qk5bi8EEclBAB8-FQJhA7lz6xsC0";

static readonly string sheet = "Control";

static SheetsService service;

static void Main(string[] args)
{

GoogleCredential credential;
using (var stream = new FileStream("client_secret.json", FileMode.Open, FileAccess.Read))
{
credential = GoogleCredential.FromStream(stream)
.CreateScoped(Scopes);

}
service = new SheetsService(new Google.Apis.Services.BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = ApplicationName,

});

ReadEntries();
Console.Read();
}

static void ReadEntries()
{
var range = $"{sheet}!A2:F20";
var request = service.Spreadsheets.Values.Get(SpreadsheetId, range);

var response = request.Execute();
var values = response.Values;
if(values != null && values.Count > 0)
{
foreach (var row in values)
{
Console.WriteLine("{0}: {1}, {2}, {3}, {4} {5}", row[0], row[1], row[2], row[3], row[4], row[5]);
}
}
else
{
Console.WriteLine("No data was found");
}
}

}
}

Posts: 785
Yes this should work quite easily for C# scripts (or VB.NET). For DLL files you can just add references. Select the script in the theme explorer and find the References property, click the browse button and then you can add/remove DLL files. For Nuget packages I think it will also work but most likely you have to use the "Open in VS Code" at least once so a "csproj" project file is created. Then in that csproj file you can add a reference to your Nuget package, or use VS Code terminal ("install-package [name]" probably).
Posts: 100
Cool, I'll see if I can figure this out. Do you think this would work alright if I convert the Console.Writeline to write directly to labels? Otherwise this works great as is as a console application. If I could figure out how to only write a line when a new entry is added instead of just polling it every x seconds...

Appreciate the help!
Posts: 81
Gonna give this a big ol bump

Is there a way to input Sheets data into labels? The best example I can think of for this would be an event with multiple qualifying sessions.