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

feature/haulmkilling
Mark van der Wal 2020-03-26 20:23:24 +01:00
parent c54d0632ee
commit bfbf6ef4bf
1 changed files with 3 additions and 0 deletions

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");