Gets the desired file, and will download it if necessary. The method may need to be called twice.
The circle you wish to pull from, the respective topic, the FileMap ID, and the file path to save into.
The desired file, and whether or not it was successful in the “SavetoPath” attempt.
public async Task<GetFileReply> GetFile(GetFileRequest request)
public class GetFileRequest {
public string CircleId;
public string TopicId;
public string FmapId;
public string SaveToPath;
}
public class GetFileReply
{
public ReturnStatus Status;
}
public void GetFile(string circleId, string fileMapId, string saveToFileName)
{
GetFileRequest request = new GetFileRequest()
{CircleId = circleId, FmapID = fileMapId, SaveToPath = saveToFileName};
GetFileReply reply = _circle.GetFile(request);
Console.WriteLine(reply.Status.Message);
}