Exemplo n.º 1
0
        private IRelationshipDetails InternalGetRelationshipBetween(object sourceIdentifier, object targetIdentifier)
        {
            IUserIdentifier sourceUserIdentifier = null;
            IUserIdentifier targetUserIdentifier = null;

            if (sourceIdentifier is long)
            {
                sourceUserIdentifier = _userFactory.GenerateUserIdentifierFromId((long)sourceIdentifier);
            }
            else
            {
                var screenName = sourceIdentifier as string;
                if (screenName != null)
                {
                    sourceUserIdentifier = _userFactory.GenerateUserIdentifierFromScreenName(screenName);
                }
                else
                {
                    sourceUserIdentifier = sourceIdentifier as IUserIdentifier;
                }
            }

            if (targetIdentifier is long)
            {
                targetUserIdentifier = _userFactory.GenerateUserIdentifierFromId((long)targetIdentifier);
            }
            else
            {
                var screenName = targetIdentifier as string;
                if (screenName != null)
                {
                    targetUserIdentifier = _userFactory.GenerateUserIdentifierFromScreenName(screenName);
                }
                else
                {
                    targetUserIdentifier = targetIdentifier as IUserIdentifier;
                }
            }

            return(GetRelationshipBetween(sourceUserIdentifier, targetUserIdentifier));
        }
Exemplo n.º 2
0
        public bool AddMemberToList(ITwitterListIdentifier list, string newUserName)
        {
            var userIdentifier = _userFactory.GenerateUserIdentifierFromScreenName(newUserName);

            return(AddMemberToList(list, userIdentifier));
        }
Exemplo n.º 3
0
        public IEnumerable <ITweet> GetUserTimeline(string userScreenName, int maximumNumberOfTweets = 40)
        {
            var user = _userFactory.GenerateUserIdentifierFromScreenName(userScreenName);

            return(GetUserTimeline(user, maximumNumberOfTweets));
        }
Exemplo n.º 4
0
        public string GetUserTimeline(string userScreenName, int maximumTweets = 40)
        {
            var userIdentifier = _userFactory.GenerateUserIdentifierFromScreenName(userScreenName);

            return(GetUserTimeline(userIdentifier, maximumTweets));
        }
Exemplo n.º 5
0
 public static IUserIdentifier GenerateUserIdentifierFromScreenName(string userScreenName)
 {
     return(_userFactory.GenerateUserIdentifierFromScreenName(userScreenName));
 }
Exemplo n.º 6
0
        public static IUserTimelineRequestParameters CreateUserTimelineRequestParameter(string screenName)
        {
            var userIdentifier = _userFactory.GenerateUserIdentifierFromScreenName(screenName);

            return(CreateUserTimelineRequestParameter(userIdentifier));
        }