Exemplo n.º 1
0
        public IEnumerable <IRelationshipStateDTO> GetRelationshipStatesWith(IEnumerable <string> targetUsersScreenName)
        {
            string userScreenNames          = _userQueryParameterGenerator.GenerateListOfScreenNameParameter(targetUsersScreenName);
            string userScreenNamesParameter = String.Format("screen_name={0}", userScreenNames);
            string query = String.Format(Resources.Friendship_GetRelationships, userScreenNamesParameter);

            return(_twitterAccessor.ExecuteGETQuery <IEnumerable <IRelationshipStateDTO> >(query));
        }
Exemplo n.º 2
0
        public List <IUserDTO> LookupUserScreenNames(List <string> userName)
        {
            if (userName.Count > MAX_LOOKUP_USERS)
            {
                throw new InvalidOperationException("Cannot retrieve that quantity of users at once");
            }

            string userIdsParameter = _queryParameterGenerator.GenerateListOfScreenNameParameter(userName);
            string query            = String.Format(Resources.User_GetUsersFromNames, userIdsParameter);

            return(_twitterAccessor.ExecutePOSTQuery <List <IUserDTO> >(query));
        }
        public string GetMultipleRelationshipsQuery(IEnumerable <string> targetUsersScreenName)
        {
            if (targetUsersScreenName == null)
            {
                return(null);
            }

            string userScreenNames          = _userQueryParameterGenerator.GenerateListOfScreenNameParameter(targetUsersScreenName);
            string userScreenNamesParameter = string.Format("screen_name={0}", userScreenNames);

            return(string.Format(Resources.Friendship_GetRelationships, userScreenNamesParameter));
        }
        public string GetMultipleRelationshipsQuery(IEnumerable <string> targetUsersScreenName)
        {
            if (targetUsersScreenName == null)
            {
                throw new ArgumentNullException("Target user screen names parameter cannot be null.");
            }

            if (targetUsersScreenName.IsEmpty())
            {
                throw new ArgumentException("Target user screen names parameter cannot be empty.");
            }

            string userScreenNames          = _userQueryParameterGenerator.GenerateListOfScreenNameParameter(targetUsersScreenName);
            string userScreenNamesParameter = string.Format("screen_name={0}", userScreenNames);

            return(string.Format(Resources.Friendship_GetRelationships, userScreenNamesParameter));
        }