C# Implementation of official Synology Web API
Yet under construction, the base classes can be easily used to talk to Synology API purely in C# way, e.g.
// ...vards=newDownloadStation(newUri(appSettings["host"]),appSettings["username"],appSettings["password"],CreateProxy(appSettings["proxy"]));vartaskList=fromtaskinds.List().Data.Tasksselecttask;// ...The current implementation supports getting information on:
- Tv shows
- Episodes
stringhost="https://yourdshost:5001/video",username="myuser",password="s3cr3t",proxy=string.Empty;varvs=newVideoStation(newUri(host),username,password,CreateProxy(proxy));TvshowResulttvShows=vs.Shows.Data.TvShows;foreach(TvShowshowintvShows){Debug.WriteLine(show.Id);Debug.WriteLine(show.Title);Debug.WriteLine(show.OriginalAvailable);// and more...}TvshowResulttvShows=vs.Shows.Data.TvShows.First();vartvEpisodes=VideoStation.FindEpisodes(show).Episodes;foreach(TvEpisodeepisodeintvEpisodes){Debug.WriteLine(episode.Episode);// Nth episode in seasonDebug.WriteLine(episode.Season);Debug.WriteLine(episode.Tagline);Debug.WriteLine(episode.Show);// the TvShow that the episode belongs to// and more...}List all tasks with status downloading or waiting, include transfer info
synods list -s downloading waiting -a transferUpload .torrent file to create new download task
synods new --file SomeStuff.torrentCreate download task from URL
synods new --url http://download.some/stuff.zipPause download task
synods pause --id dbid_2420