CODICE VISUAL STUDIO 2010 - VISUAL BASIC .NET - VB.NET:
Dim UserName As String = "Username@gmail.com"
Dim Password As String = "Password"
Private Function ElencoFiles() As String()
Try
Dim ArrayElencoFile As New List(Of String)
Dim Service As DocumentsService = New DocumentsService("CloudBox")
Service.setUserCredentials(UserName, Password)
Dim Query As DocumentsListQuery = New DocumentsListQuery()
Dim Feed As DocumentsFeed = Service.Query(Query)
If Feed.Entries.Count = 0 Then
Return Nothing
End If
For Each Entry As DocumentEntry In Feed.Entries
Console.WriteLine(Entry.Title.Text) 'Stampa nome del file in Console
ArrayElencoFile.Add(Entry.Title.Text) 'Aggiunge il nome del file all'elenco
Next
Return ArrayElencoFile.ToArray
Catch ex As Exception
MsgBox("Errore : " + ex.ToString, MsgBoxStyle.Critical, "Errore Caricamento Lista File Server Google")
Return Nothing
End Try
End Function