Exemplo n.º 1
0
        /// <summary>
        /// Get list members
        /// </summary>
        /// <param name="provider">credential provider</param>
        /// <param name="userScreenName">list owner user's id</param>
        /// <param name="slug">list id</param>
        public static IEnumerable <TwitterUser> GetListMembersAll(this CredentialProvider provider, string userScreenName, string slug)
        {
            slug = slug.Replace("_", "-");

            var para = new List <KeyValuePair <string, string> >();

            if (!String.IsNullOrEmpty(slug))
            {
                para.Add(new KeyValuePair <string, string>("slug", OAuth.UrlEncode(slug, Encoding.UTF8, true)));
            }
            if (!String.IsNullOrEmpty(userScreenName))
            {
                para.Add(new KeyValuePair <string, string>("owner_screen_name", userScreenName));
            }

            return(provider.GetUsersAll("lists/members.json", para));
        }