Fix for first time use of api with clientid/clientsecret.

This commit is contained in:
Mark van der Wal 2020-03-26 20:23:24 +01:00
parent c54d0632ee
commit bfbf6ef4bf

View File

@ -38,6 +38,9 @@ namespace FarmmapsApiSamples
{
try
{
// !! this call is needed the first time an api is called with a fresh clientid and secret !!
await _farmmapsApiService.GetCurrentUserCodeAsync();
var roots = await _farmmapsApiService.GetCurrentUserRootsAsync();
var uploadedRoot = roots.SingleOrDefault(r => r.Name == "Uploaded");
var myDriveRoot = roots.SingleOrDefault(r => r.Name == "My drive");