-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,534 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,35 @@ | ||
# synologydotnet-audiostation | ||
Synology AudioStation client for .NET | ||
# SynologyDotNet.AudioStation | ||
Synology AudioStation client for .NET. | ||
|
||
* Requires [SynologyDotNet.Core](https://www.nuget.org/packages/SynologyDotNet.Core/) | ||
* Targets **.NET Standard 2.0** | ||
|
||
## NuGet package | ||
|
||
[NuGet package availabe here](https://www.nuget.org/packages/SynologyDotNet.AudioStation/) | ||
``` | ||
Install-Package SynologyDotNet.AudioStation | ||
``` | ||
|
||
## Usage examples | ||
|
||
### Basic example with SynoClient | ||
|
||
In order to consume data, you may also add other NuGet packages like **SynologyDotNet.AudioStation**. | ||
This example shows how to configure the connection and login with username and password. | ||
|
||
``` | ||
// Create an AudioStationClient | ||
var audioStation = new AudioStationClient(); | ||
// Create the SynoClient which communicates with the server, this can be re-used across all Station Clients. | ||
var client = new SynoClient(new Uri("https://MySynolgyNAS:5001/"), audioStation); | ||
// Login | ||
await client.LoginAsync("username", "password"); | ||
// Get 100 artists from the music library. | ||
var response = await audioStation.ListArtistsAsync(100, 0); | ||
foreach(var artist in response.Data.Artists) | ||
Console.WriteLine(artist.Name); | ||
``` |
Oops, something went wrong.