namespace Aspose.Cells.Cloud.SDK.Tests.Api.Example
{
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Aspose.Cells.Cloud.SDK.Request;
    using System.Collections.Generic;
    using Aspose.Cells.Cloud.SDK.Model;
    using Aspose.Cells.Cloud.SDK.Api;
    using System;
    using System.IO;

    [TestClass]
    public class CellsApiExample
    {
          string CellsCloudClientId ="....";//get from https://dashboard.aspose.cloud/#/applications
        string CellsCloudClientSecret="...";//get from https://dashboard.aspose.cloud/#/applications
        private readonly string remoteFolder = "TestData/In";
        string localName = "Book1.xlsx";
        string remoteName = "remote_book1.xlsx";
        string localPath = "D:/TestData/CellsCloud";
        [TestCategory("Cells")]
        [TestMethod]
        public void Example()
        {


                UploadFileRequest uploadFileRequest = new UploadFileRequest();
                System.IO.FileInfo fileInfo = new System.IO.FileInfo(localPath + "/" + localName);
                uploadFileRequest.path = remoteFolder + "/" + remoteName;
                uploadFileRequest.storageName = "";
                uploadFileRequest.UploadFiles = new Dictionary<string, Stream>() { { localName, File.OpenRead(localPath +"/"+ localName) } };
                cellsApi.UploadFile(uploadFileRequest);



var legend = new Legend()
{
    Position = "Top"
};
var request = new PostWorksheetChartLegendRequest(
    name: remoteName,
    sheetName: "Sheet4",
    chartIndex: 0,
    legend: legend,
    folder: remoteFolder,
    storageName: ""
);
cellsApi.PostWorksheetChartLegend(request);














        }


    }
}