Пример #1
0
        // STATUS [ June 23, 2019 ]: this works
        // not sure if this is really needed - but good to include for testing purposes
        public IEnumerable <IUser> GetSelectedNumberOfMembersOfTwitterList(string listName, string screenName, int countOfMembersToGet)
        {
            ITwitterList        list    = TwitterList.GetExistingList(listName, screenName);
            IEnumerable <IUser> members = list.GetMembers(countOfMembersToGet);

            // PrintListMemberInfo(members);
            return(members);
        }
Пример #2
0
        // STATUS [ June 24, 2019 ]: this works
        /// <summary>
        ///     Gets list of twitter IUsers that are members of a Twitter list
        /// </summary>
        /// <remarks>
        ///     Uses tweetinvi to get ITwitterList list
        ///     See: https://github.com/linvi/tweetinvi/wiki/Twitter-Lists
        /// </remarks>
        /// <param name="listName">
        ///     The name of the list as defined by the user (e.g., 'Baseball')
        /// </param>
        /// <param name="screenName">
        ///     The screen name / Twitter handle / user name that you want
        /// </param>
        /// <example>
        ///     var members = GetAllMembersOfTwitterList("baseball","mr_baseball");
        /// </example>
        /// <returns>
        ///     IEnumerable of IUsers
        /// </returns>
        public IEnumerable <IUser> GetAllMembersOfTwitterList(string listName, string screenName)
        {
            ITwitterList        list            = TwitterList.GetExistingList(listName, screenName);
            int                 listMemberCount = list.MemberCount;
            IEnumerable <IUser> members         = list.GetMembers(listMemberCount);

            PrintListMemberInfo(members);
            return(members);
        }
Пример #3
0
 private static IEnumerable <IUser> GetUsersInList(ITwitterList list)
 {
     return(list.GetMembers(list.MemberCount));
 }