public void LoginCorrectly() { Snapchat sc = new Snapchat(); string password = Settings.Default.Password; var auth = sc.Login("themysterious", password); Assert.AreEqual(auth, true); }
public void GetAllSnap() { var sc = new Snapchat(); string password = Settings.Default.Password; bool auth = sc.Login("themysterious", password); foreach (Snap snap in sc.Account.Snaps) { if (snap.SentToUs && snap.Status == Enums.SnapStates.Delivered && snap.MediaType != Enums.MediaTypes.FriendRequest) { Console.WriteLine("{0} -> {1}", snap.ScreenName, snap.RecipentName); Console.WriteLine(snap.Status); try { byte[] by = sc.GetBlob(snap.Id, "themysterious", sc.Account.AuthToken); File.WriteAllBytes(snap.Id + ".jpg", by); } catch (Exception) { foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(snap)) { string name = descriptor.Name; object value = descriptor.GetValue(snap); Console.WriteLine("{0}={1}", name, value); } throw; } } } }
public void GetSnap() { var sc = new Snapchat(); string password = Settings.Default.Password; bool auth = sc.Login("themysterious", password); byte[] by = sc.GetBlob("555624400068219037r", "themysterious", sc.Account.AuthToken); File.WriteAllBytes("test.jpg", by); }
public void LoginIncorrectly() { Snapchat sc = new Snapchat(); bool auth = sc.Login("helloknockknock", "thisisnotmypassword"); Assert.AreEqual(auth, false); }