コード例 #1
0
        public HttpResponseMessage GetTweetsSearched(string key)
        {
            var tweets = _tweetManager.SearchTweets(key).OrderByDescending(t => t.CreatedOn).Select(sp => sp.ToTweetDto());
            TweetResponseDto tweetsResponseDto = new TweetResponseDto
            {
                Tweets      = tweets,
                TweetsCount = tweets.Count()
            };

            return(Request.CreateResponse(HttpStatusCode.OK, tweetsResponseDto));
        }
コード例 #2
0
 public HttpResponseMessage GetTweetsSearched(string key)
 {
     return(Request.CreateResponse(HttpStatusCode.OK, _tweetManager.SearchTweets(key).Select(sp => sp.ToTweetDto())));
 }