public UserList AddToList(long listId, params string[] newMemberScreenNames)
        {
            NameValueCollection request = new NameValueCollection();

            request.Add("screen_name", ArrayUtils.Join(newMemberScreenNames));
            request.Add("list_id", listId.ToString());
            return(this.restTemplate.PostForObject <UserList>("lists/members/create_all.json", request));
        }
        public RestOperationCanceler AddToListAsync(long listId, string[] newMemberScreenNames, Action <RestOperationCompletedEventArgs <UserList> > operationCompleted)
        {
            NameValueCollection request = new NameValueCollection();

            request.Add("screen_name", ArrayUtils.Join(newMemberScreenNames));
            request.Add("list_id", listId.ToString());
            return(this.restTemplate.PostForObjectAsync <UserList>("lists/members/create_all.json", request, operationCompleted));
        }
        public Task <UserList> AddToListAsync(long listId, params long[] newMemberIds)
        {
            NameValueCollection request = new NameValueCollection();

            request.Add("user_id", ArrayUtils.Join(newMemberIds));
            request.Add("list_id", listId.ToString());
            return(this.restTemplate.PostForObjectAsync <UserList>("lists/members/create_all.json", request));
        }
示例#4
0
        public RestOperationCanceler GetRateLimitStatusAsync(string[] resources, Action <RestOperationCompletedEventArgs <IList <RateLimitStatus> > > operationCompleted)
        {
            NameValueCollection parameters = new NameValueCollection();

            if (resources.Length > 0)
            {
                parameters.Add("resources", ArrayUtils.Join(resources));
            }
            return(this.restTemplate.GetForObjectAsync <IList <RateLimitStatus> >(this.BuildUrl("application/rate_limit_status.json", parameters), operationCompleted));
        }
示例#5
0
        public IList <RateLimitStatus> GetRateLimitStatus(params string[] resources)
        {
            NameValueCollection parameters = new NameValueCollection();

            if (resources.Length > 0)
            {
                parameters.Add("resources", ArrayUtils.Join(resources));
            }
            return(this.restTemplate.GetForObject <IList <RateLimitStatus> >(this.BuildUrl("application/rate_limit_status.json", parameters)));
        }
示例#6
0
        public Task <IList <TwitterProfile> > GetUsersAsync(params string[] screenNames)
        {
            string joinedScreenNames = ArrayUtils.Join(screenNames);

            return(this.restTemplate.GetForObjectAsync <IList <TwitterProfile> >(this.BuildUrl("users/lookup.json", "screen_name", joinedScreenNames)));
        }
示例#7
0
        public Task <IList <TwitterProfile> > GetUsersAsync(params long[] userIds)
        {
            string joinedIds = ArrayUtils.Join(userIds);

            return(this.restTemplate.GetForObjectAsync <IList <TwitterProfile> >(this.BuildUrl("users/lookup.json", "user_id", joinedIds)));
        }
示例#8
0
        public RestOperationCanceler GetUsersAsync(string[] screenNames, Action <RestOperationCompletedEventArgs <IList <TwitterProfile> > > operationCompleted)
        {
            string joinedScreenNames = ArrayUtils.Join(screenNames);

            return(this.restTemplate.GetForObjectAsync <IList <TwitterProfile> >(this.BuildUrl("users/lookup.json", "screen_name", joinedScreenNames), operationCompleted));
        }
示例#9
0
        public RestOperationCanceler GetUsersAsync(long[] userIds, Action <RestOperationCompletedEventArgs <IList <TwitterProfile> > > operationCompleted)
        {
            string joinedIds = ArrayUtils.Join(userIds);

            return(this.restTemplate.GetForObjectAsync <IList <TwitterProfile> >(this.BuildUrl("users/lookup.json", "user_id", joinedIds), operationCompleted));
        }