0

Recently I've taken the time to migrate a VB.NET project that used google drive apis v2 to the v3 instead. I got the basic things to work but there are some details about storage usage and some other simple safety validations that I did that now don't work. It's quite silly actually, but I don't know how to get this to work, here's the thing:

In v2 I used this line - service.About.Get().Execute.User.EmailAddress - to get the email address that the token was created with, and then compared it to the one that the user was actually trying to upload files to, and see if they matched. The problem is that I can't make that line work anymore, I've read in another question here in SO Google Drive API v3 Migration that this:

service.about().get().setFields("user, storageQuota").execute()

should be the new way of doing this kind of thing, but visual studio says there's not such method like "setFields" there.

Does anyone know what am I doing wrong or what is the correct way of doing this in VB.NET? Thanks.

Community
  • 1
  • 1
Nadyn
  • 11
  • 2
  • Hi, and welcome to Stack Overflow, This is just a message I send to new members to help things along a bit. The learning curve for a new user isn't steep as such, but finding out how to use stack isn't always obvious. Please do take a few minutes and have a look here [ask] and it's also important to look here .. [mcve].. Also, if an answer is valid for you, click on the tick to the left of the answer so that the question is marked as answered and this makes sure that the person who posted it gets reputation. Cheers. – David Wilson Feb 25 '16 at 09:28
  • Based from this [documentation](https://developers.google.com/drive/v3/web/quickstart/dotnet), `.setFields()` is for Java. You can [request](https://developers.google.com/drive/v3/web/search-parameters) by using `request.Fields = "nextPageToken, files(id, name)";`. – abielita Feb 26 '16 at 08:03

0 Answers0