Giter Club home page Giter Club logo

yifylib's Introduction

NOTE

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.

YifyLib

Introduction

.NET library to access Yts (formaly Yify) API.

This provide access to functionalities of Yts API like,

Etc…

Installing

You can install this library using either

  1. Package Manager Dialog
  2. Package Manager Console

To install via Package Manager Dialog

  1. Open the Package Manager Dialog.
  2. Search for YifyLib in Online > nuget.org section.

To install via Package Manager Console

  1. Open Package Manager Console.
  2. Run the following command.
  Install-Package YifyLib

Getting Started

Prerequisites

  • .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)

Installing

  • Install YifyLib

And that's it!.


Examples

Namespaces

using YifyLib;
using YifyLib.Data;

Intialization

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>";

Searching for movies (ListMovies)

Basic Search
  • Search for movies where movie tile contains the word Bourne.
List<ListMovie> searchResult = yify.ListMovies("Bourne");
Advanced Search
  • 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);
Sorting and Ordering search result
  • 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 (GetMovie)

  • Getting movie details for movie 100.
Movie m = y.GetMovie(100);

Coming Soon

  • YTS.AG API release (Basic Functionality)
  • Changes to Examples

yifylib's People

Contributors

heshan-nibaya avatar lokukarawita avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yifylib's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.