예제 #1
0
        public static ITweet CreateTweet(string text)
        {
            if (text == null)
            {
                throw new ArgumentNullException("Text cannot be null");
            }

            return(TweetFactory.CreateTweet(text));
        }
예제 #2
0
        public static ITweet PublishTweetWithGeoInReplyTo(string text, ICoordinates coordinates, long tweetIdToRespondTo)
        {
            var tweet = TweetFactory.CreateTweet(text);

            if (TweetController.PublishTweetWithGeoInReplyTo(tweet, coordinates, tweetIdToRespondTo))
            {
                return(tweet);
            }

            return(null);
        }
예제 #3
0
        public static ITweet PublishTweetWithGeoInReplyTo(string text, double longitude, double latitude, long tweetIdToRespondTo)
        {
            var tweet = TweetFactory.CreateTweet(text);

            if (TweetController.PublishTweetWithGeoInReplyTo(tweet, longitude, latitude, tweetIdToRespondTo))
            {
                return(tweet);
            }

            return(null);
        }
예제 #4
0
        public static ITweet PublishTweetWithGeoInReplyTo(string text, double longitude, double latitude, ITweet tweetToReplyTo)
        {
            if (tweetToReplyTo == null)
            {
                throw new ArgumentException("Tweet cannot be null!");
            }

            var tweet = TweetFactory.CreateTweet(text);

            if (PublishTweetWithGeoInReplyTo(tweet, longitude, latitude, tweetToReplyTo.Id))
            {
                return(tweet);
            }

            return(null);
        }
예제 #5
0
        // Publish TweetInReplyTo With Geo info
        public static ITweet PublishTweetWithGeoInReplyTo(string text, ICoordinates coordinates, ITweet tweetToReplyTo)
        {
            if (tweetToReplyTo == null)
            {
                throw new ArgumentException("Tweet cannot be null!");
            }

            var tweet = TweetFactory.CreateTweet(text);

            if (TweetController.PublishTweetWithGeoInReplyTo(tweet, coordinates, tweetToReplyTo.Id))
            {
                return(tweet);
            }

            return(null);
        }
예제 #6
0
 public static IEnumerable <ITweet> GenerateTweetsFromDTO(IEnumerable <ITweetDTO> tweetsDTO)
 {
     return(TweetFactory.GenerateTweetsFromDTO(tweetsDTO));
 }
예제 #7
0
 public static ITweet GenerateTweetFromDTO(ITweetDTO tweetDTO)
 {
     return(TweetFactory.GenerateTweetFromDTO(tweetDTO));
 }
예제 #8
0
 public static IEnumerable <ITweet> GetTweets(params long[] tweetIds)
 {
     return(TweetFactory.GetTweets(tweetIds));
 }
예제 #9
0
 public static ITweet GetTweet(long tweetId)
 {
     return(TweetFactory.GetTweet(tweetId));
 }
예제 #10
0
        public static ITweet PublishTweetInReplyTo(string text, long tweetToReplyToId)
        {
            var tweet = TweetFactory.CreateTweet(text);

            return(TweetController.PublishTweetInReplyTo(tweet.TweetDTO, tweetToReplyToId));
        }
예제 #11
0
 public static ITweet CreateTweet(string text)
 {
     return(TweetFactory.CreateTweet(text));
 }
예제 #12
0
 public Tweeter(TweetFactory tw, SMS sms, [Parameter(Value = typeof(PhoneNumber))] long phoneNumber)
 {
     this.tw          = tw;
     this.sms         = sms;
     this.phoneNumber = phoneNumber;
 }