and that page says that there is sample code in TTMSFNCCloudStorageServices. There is not. (That demo uses the TTMSFNCCloudStorageServices component.)
The Search() and GetFolderList() methods are not documented on that page. They take additional parameters that are not used by the general TTMSFNCCloudStorageServices component.
Where is there sample source code using the TTMSFNCCloudGoogleDrive component? Or more documentation on Search() and GetFolderList()?
GetFolderList takes one parameter that allows to define a specific folder.
GetFolderList Retrieve the list of files and folders for the root folder or a specific folder
Search Search for files and folders based on a query.
Options:
ExactMatch: indicate if the query should match the filename exactly
FileNameOnly: indicate if the search applies to the filename only or also to the contents of the file
FileExtensions: only return files that have one of the given extensions
Folder: only return results for files in this folder
Unfortunately there's currently no full demo available for this component specifically, apart from the basic demo page in the Overview Demo.
The basic usage is similar to that of the TTMSFNCCloudStorageServices component for which there is a full demo available.
We'll investigate to improve documentation and samples for TTMSFNCCloudGoogleDrive.
Is there any specific functionality you require further help with?
While the basic usage may be similar to that of TTMSFNCCloudStorageServices, I have been using that component for years. I have been unable to get any code running successfully with the TTMSFNCCloudGoogleDrive component.
Currently the TTMSFNCCloudStorageServices component causes iOS projects to freeze and crash so I'd like to be able to use the TTMSFNCCloudGoogleDrive component. Even the smallest sample of working code to connect and fetch the contents of a folder would be wonderful.
This is a basic sample for TTMSFNCCloudGoogleDrive that connects with the service and displays a list of filenames found in the root folder. This is working as expected on Windows when tested here.
The reported issues on iOS are still under investigation.
procedure TForm1.Button1Click(Sender: TObject);
begin
TMSFNCCloudGoogleDrive1.Authentication.ClientID := '{clientid}';
TMSFNCCloudGoogleDrive1.Authentication.Secret := '{secret}';
TMSFNCCloudGoogleDrive1.Authentication.CallBackURL := '{callbackurl}';
TMSFNCCloudGoogleDrive1.Connect;
end;
procedure TForm1.TMSFNCCloudGoogleDrive1Connected(Sender: TObject);
begin
TMSFNCCloudGoogleDrive1.GetFolderList;
end;
procedure TForm1.TMSFNCCloudGoogleDrive1GetFolderList(Sender: TObject;
const AFolderList: TTMSFNCCloudItems;
const ARequestResult: TTMSFNCCloudBaseRequestResult);
var
I: Integer;
begin
ListBox1.Clear;
for I := 0 to AFolderList.Count - 1 do
begin
ListBox1.Items.Add(AFolderList.Items[I].FileName);
end;
end;