Пример #1
0
        public UserPrefsContainer Validate(UserPrefsContainer userPrefsContainer)
        {
            CheckNull(userPrefsContainer);
            CheckNull(userPrefsContainer.Data, "Reddit API returned empty response object.");

            return(userPrefsContainer);
        }
Пример #2
0
        public void Prefs()
        {
            AccountPrefs prefs = reddit.Models.Account.Prefs();
            List <UserPrefsContainer> prefsFriends   = reddit.Models.Account.PrefsList("friends", new CategorizedSrListingInput());
            List <UserPrefsContainer> prefsMessaging = reddit.Models.Account.PrefsList("messaging", new CategorizedSrListingInput());
            UserPrefsContainer        prefsBlocked   = reddit.Models.Account.PrefsSingle("blocked", new CategorizedSrListingInput());
            UserPrefsContainer        prefsTrusted   = reddit.Models.Account.PrefsSingle("trusted", new CategorizedSrListingInput());

            Assert.IsNotNull(prefs);
            Assert.IsNotNull(prefsFriends);
            Assert.IsNotNull(prefsBlocked);
            Assert.IsNotNull(prefsMessaging);
            Assert.IsNotNull(prefsTrusted);
        }