Currently working on porting to YTS.AG API (Update 2016/11/4)
- Some of the features of YTS.AG api are still under construction (i think). So going with what we have at the moment
Since deprecation of API v1 by Yts, YifyLib (since v1.1) no longer support the v1 of Yts API.
See Coming Soon section for future developments.
.NET library to access Yts (formaly Yify) API.
This provide access to functionalities of Yts API like,
- Searching for movies (ListMovies)
- Getting movie details (GetMovie)
Etc…
You can install this library using either
- Open the Package Manager Dialog.
- Search for
YifyLib
inOnline
>nuget.org
section.
- Open Package Manager Console.
- Run the following command.
Install-Package YifyLib
- .NET Framework 4.5 or later (Download from here)
If you are planning to use more advanced features of YTS API v2 then you need:
- Application Key from YTS (Request one from here)
- Install
YifyLib
And that's it!.
using YifyLib;
using YifyLib.Data;
Yify yify = new Yify();
or
Yify yify = new Yify(new Uri("https://yts.to/api/v2/"));
If you are planning to use more advanced features of YTS API v2 then you need to initialize as:
Yify yify = new Yify();
yify.ApplicationKey = "<Your Application Key>";
- Search for movies where movie tile contains the word
Bourne
.
List<ListMovie> searchResult = yify.ListMovies("Bourne");
- Search for movies where movie tile contains the word
Bourne
,720p
quality and with minimum rating of 5.
List<ListMovie> result = y.ListMovies("Bourne",
quality: "720p",
minimumRating: 5);
- To Sort the search results by a particular field use
SearchResultSort
enum. - To Order the search result in ascending or descending order use
SortOrder
enum.
Search movies where movie tile contains the word Bourne
, sorted by added date and orderd in ascending order.
List<ListMovie> result = y.ListMovies("Bourne",
sortBy: SearchResultSort.DateAdded,
orderBy: YifyLib.SortOrder.Asc);
- Getting movie details for movie 100.
Movie m = y.GetMovie(100);
- YTS.AG API release (Basic Functionality)
- Changes to Examples