static void Main(string[] args) { Yify y = new Yify(new Uri("https://yts.ag/api/v2/")); //y.Proxy = new System.Net.WebProxy("localhost", 8888); y.ApplicationKey = "aaaaaaa"; var details = y.ListMovies(queryTerm: "Martian", quality: "3D", sortBy: SearchResultSort.Year, orderBy: YifyLib.SortOrder.Desc); var movie = y.GetMovie(details.First().ID, true, true); var suggestins = y.GetMovieSuggestion(details.First().ID); Console.ReadLine(); //Application.Run(new Form1()); //JavaScriptSerializer sr = new JavaScriptSerializer(); //var data = sr.Deserialize<dynamic>("{'aa' : 'bb', 'obj' : {'objp' : '1'}, 'ary' :[1, 2, 3]}"); //r val = data.aa; /*Console.ReadLine();*/ //var movie = y.RegisterUser(""); // Console.ReadLine(); //XmlDocument d = new XmlDocument(); //d.Load(@"D:\a.txt"); }
public static void CheckLoggedIn(this Yify y) { if (!y.IsLoggedIn) { throw new YifyNotLoggedInException("Login required to access this functionality. User Yify.Login function first."); } }
public static void CheckAppKey(this Yify y) { if (string.IsNullOrWhiteSpace(y.ApplicationKey)) { throw new YifyMissingAppKeyException( "Application Key is missing." + " Make sure that you enter correct application key to Yify.ApplicationKey property. " + "If you do not posses an application key then request an application key from https://yts.ag/contact"); } }
private void Form1_Load(object sender, EventArgs e) { //Yify y = new Yify(new Uri("https://yts.ag/api/v2/")); //var m = y.GetMovie(3105, includeCast: true, includeImages: true); //foreach (var item in m.Actors) //{ // this.flowLayoutPanel1.Controls.Add(new Actor(item)); //} Yify y = new Yify(new Uri("https://yts.ag/api/v2/")); //var v = y.Login("YifyLib", "911119"); //var details = y.GetUserDetails(1288583); }