コード例 #1
0
		public async Task FindFriendAsyncTest()
		{
			// There has to be a better way...
			var tups = new ObservableCollection<Tuple<string, string>> { new Tuple<string, string>("5173037008", "Collin Yoloman") };

			var sm = new SnapChatManager(Settings.Username, Settings.AuthToken);
			var res = await sm.Endpoints.FindFriendsAsync("US", tups);

			Assert.AreEqual(true, true);
		}
コード例 #2
0
		public async Task SettingsAsyncTest()
		{
			var sm = new SnapChatManager(Settings.Username, Settings.AuthToken);
			var pr = await sm.Endpoints.UpdateAccountPrivacyAsync(true);
			var bd = await sm.Endpoints.UpdateBirthdayAsync(10, 23);
			var em = await sm.Endpoints.UpdateEmailAsync(sm.Account.Email);
			var nsfw = await sm.Endpoints.UpdateMaturitySettingsAsync(true);
			var st = await sm.Endpoints.UpdateStoryPrivacyAsync(true);
			var fs = await sm.Endpoints.UpdateFeatureSettingsAsync(true, true, true, true, true);
			var bffs = await sm.Endpoints.SetBestFriendCountAsync(5);

			Assert.AreEqual(true, true);
		}
コード例 #3
0
		public async Task SolveCaptchaAsyncTest()
		{
			var sm = new SnapChatManager();
			var registration = await sm.Endpoints.RegisterAsync(20, "1993-08-08", "*****@*****.**", "dildosROCK");
			var captchaZip = await sm.Endpoints.GetCaptchaImagesAsync(registration.Email, registration.AuthToken);

			bool[] answer =		{false, false, true,
								 false, true, true,
								 false, false, true};

			//var solved = await sm.Endpoints.SolveCaptchaAsync(registration.Email, captchaZip.Id, registration.AuthToken, answer);
			// This will return false (caught 403), unless the answer above matches up with the actual solution.
			// I set an endpoint on 'solved' above, and copied the values for registration.Email, captchaZip.Item1, and registration.AuthToken
			// to the method below, extracted the PNGs, and edited the 'answer' array to be the correct answer,
			// commented out 'registration' and 'captchaZip', and got a true response (200).

			var solved = await sm.Endpoints.SolveCaptchaAsync("*****@*****.**", "[email protected]~1397508216713", "b2fc8ed6-72e5-4c27-aae3-e1968f8e110e", answer);
			var account = await sm.Endpoints.RegisterUsernameAsync("*****@*****.**", "b2fc8ed6-72e5-4c27-aae3-e1968f8e110e", "registration_test");

			Assert.AreEqual(true, true);
		}