Skip to content

Commit

Permalink
Updating the description and documentation. Methods in Yandex.Disk ha…
Browse files Browse the repository at this point in the history
…s been renamed.
  • Loading branch information
H0pex committed Jun 8, 2023
1 parent 196528c commit 834cb7b
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 31 deletions.
4 changes: 2 additions & 2 deletions Yandex/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
// Можно задать все значения или принять номера сборки и редакции по умолчанию
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("23.0.0.1")]
[assembly: AssemblyFileVersion("23.0.0.1")]
[assembly: AssemblyVersion("23.0.0.3")]
[assembly: AssemblyFileVersion("23.0.0.3")]
[assembly: NeutralResourcesLanguage("ru")]
2 changes: 0 additions & 2 deletions Yandex/Yandex.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="README.md" />
<None Include="LICENSE.md" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="YandexDisk\Disk.cs" />
<Compile Include="YandexSpeech\Emotions.cs" />
Expand Down
20 changes: 16 additions & 4 deletions Yandex/YandexDisk/Disk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,27 @@ public class Disk
/// <param name="diskPath">Path on disk with extension.</param>
/// <param name="localPath">Local path with extension.</param>
/// <param name="isOwerwrite">Need overwrite file.</param>
public async void UpLoad(string diskPath, string localPath, bool isOwerwrite = false)
=> await new DiskHttpApi(Token).Files.UploadFileAsync(diskPath, isOwerwrite, localPath, CancellationToken.None);
public async void UploadFile(string diskPath, string localPath, bool isOwerwrite = false)
=> await new DiskHttpApi(Token)
.Files
.UploadFileAsync(
path: diskPath,
overwrite: isOwerwrite,
localFile: localPath,
cancellationToken: CancellationToken.None
);

/// <summary>
/// Asynchronous disk loading.
/// </summary>
/// <param name="diskPath">Path on disk with extension.</param>
/// <param name="localPath">Local path with extension.</param>
public async void DownLoad(string diskPath, string localPath)
=> await new DiskHttpApi(Token).Files.DownloadFileAsync(diskPath, localPath);
public async void DownLoadFile(string diskPath, string localPath)
=> await new DiskHttpApi(Token)
.Files
.DownloadFileAsync(
path: diskPath,
localFile: localPath
);
}
}
8 changes: 1 addition & 7 deletions Yandex/YandexSpeech/Emotions.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hopex.YandexSpeech
namespace Hopex.YandexSpeech
{
/// <summary>
/// List of intonations.
Expand Down
8 changes: 1 addition & 7 deletions Yandex/YandexSpeech/Speakers.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hopex.YandexSpeech
namespace Hopex.YandexSpeech
{
/// <summary>
/// List of voices.
Expand Down
Binary file modified Yandex/bin/Release/Hopex.Yandex.dll
Binary file not shown.
Binary file modified Yandex/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
File renamed without changes.
18 changes: 9 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@ The library contains a class for playing text with 6 voices and 3 intonations, a

#### .NET CLI
```CLI
> dotnet add package Hopex.Yandex --version 23.0.1
> dotnet add package Hopex.Yandex --version 23.0.3
```

#### Package Manager
```CLI
PM> NuGet\Install-Package Hopex.Yandex -Version 23.0.1
PM> NuGet\Install-Package Hopex.Yandex -Version 23.0.3
```

#### PackageReference
```XML
<PackageReference Include="Hopex.Yandex" Version="23.0.1" />
<PackageReference Include="Hopex.Yandex" Version="23.0.3" />
```

#### Paket CLI
```CLI
> paket add Hopex.Yandex --version 23.0.1
> paket add Hopex.Yandex --version 23.0.3
```

#### Script & Interactive
```CLI
> #r "nuget: Hopex.Yandex, 23.0.1"
> #r "nuget: Hopex.Yandex, 23.0.3"
```

#### Cake
```
// Install Hopex.Yandex as a Cake Addin
#addin nuget:?package=Hopex.Yandex&version=23.0.1
#addin nuget:?package=Hopex.Yandex&version=23.0.3
// Install Hopex.Yandex as a Cake Tool
#tool nuget:?package=Hopex.Yandex&version=23.0.1
#tool nuget:?package=Hopex.Yandex&version=23.0.3
```

# How to use
Expand All @@ -52,14 +52,14 @@ public void YandeskDisk()
Disk MyDisk = new Disk(oauthToken);

// Upload file from local
Disk.UpLoad(
Disk.UploadFile(
diskPath: "SomeFolder/MyDocs/Template.docx",
localPath: @"C:\%USERPROFILE%\Desktop\Template.docx",
isOwerwrite: false
);

// Download file from disk
Disk.DownLoad(
Disk.DownLoadFile(
diskPath: "SomeFolder/MyDocs/Template.docx",
localPath: @"C:\%USERPROFILE%\Desktop\Template.docx"
);
Expand Down
Binary file added images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 834cb7b

Please sign in to comment.