public async Task GetPublishDirectLinkTest() { MailRuCloud cloud = new MailRuCloud(); string downloadLink = await cloud.GetPublishDirectLink("https://cloud.mail.ru/public/Euhr/WwtEeZmKH", FileType.SingleFile); Assert.IsNotNull(downloadLink); }
public void GetPublishDirectLinkTest() { var api = new MailRuCloud(); api.Account = this.account; var items = api.GetItems("/Camera Uploads"); var fileToDownload = items.Files.First(t => t.Size <= 1 * 1024 * 1024); var publicFileLink = api.GetPublishLink(fileToDownload); Assert.IsTrue(!string.IsNullOrEmpty(publicFileLink)); var directLink = api.GetPublishDirectLink(publicFileLink); Assert.IsTrue(!string.IsNullOrEmpty(directLink)); var unpublishFile = api.UnpublishLink(fileToDownload, publicFileLink); Assert.IsTrue(unpublishFile); }