public TwitterTimelineResponse GetRecentTweets(int blogId) { TwitterTimelineResponse latestTweets = default(TwitterTimelineResponse); try { var blogHome = Umbraco.TypedContent(blogId); if (blogHome != null) { var twitterAccount = blogHome.HasProperty("authenticatedTwitterAccount") && blogHome.HasValue("authenticatedTwitterAccount") ? blogHome.GetPropertyValue <TwitterOAuthData>("authenticatedTwitterAccount") : default(TwitterOAuthData); if (twitterAccount != null) { //get twitter service using authenticated twitter details Skybrud.Social.Twitter.TwitterService service = twitterAccount.GetService(); //get last 5 tweets latestTweets = service.Statuses.GetUserTimeline(twitterAccount.ScreenName, 5); } } } catch (Exception ex) { LogHelper.Error(typeof(TweetThisApiController), "Error Retrieving Timeline", ex); } return(latestTweets); }
/// <summary> /// Gets a list of favorites based on the specified <code>options</code>. /// </summary> /// <param name="options">The options for the call to the API.</param> public TwitterTimelineResponse GetFavorites(TwitterGetFavoritesOptions options) { return(TwitterTimelineResponse.ParseResponse(Raw.GetFavorites(options))); }
/// <summary> /// Gets a list of favorites of the user with the specified <code>screenName</code>. /// </summary> /// <param name="screenName">The screen name of the user.</param> public TwitterTimelineResponse GetFavorites(string screenName) { return(TwitterTimelineResponse.ParseResponse(Raw.GetFavorites(screenName))); }
/// <summary> /// Gets a list of favorites of the user with the specified <code>userId</code>. /// </summary> /// <param name="userId">The ID of the user.</param> public TwitterTimelineResponse GetFavorites(long userId) { return(TwitterTimelineResponse.ParseResponse(Raw.GetFavorites(userId))); }
/// <summary> /// Gets a list of favorites of the authenticated user. /// </summary> public TwitterTimelineResponse GetFavorites() { return(TwitterTimelineResponse.ParseResponse(Raw.GetFavorites())); }
/// <summary> /// Gets the timeline of the user with the specified <code>userId</code>. /// </summary> /// <param name="userId">The ID of the user.</param> public TwitterTimelineResponse GetUserTimeline(long userId) { return(TwitterTimelineResponse.ParseResponse(Raw.GetUserTimeline(userId))); }
/// <summary> /// Returns the most recent tweets authored by the authenticating user that have been retweeted by others. /// </summary> /// <param name="options">The options for the call.</param> public TwitterTimelineResponse GetRetweetsOfMe(TwitterTimelineOptions options) { return(TwitterTimelineResponse.ParseResponse(Raw.GetRetweetsOfMe(options))); }
/// <summary> /// Returns the most recent tweets authored by the authenticating user that have been retweeted by others. /// </summary> /// <param name="count">The maximum amount of tweets to return.</param> public TwitterTimelineResponse GetRetweetsOfMe(int count) { return(TwitterTimelineResponse.ParseResponse(Raw.GetRetweetsOfMe(count))); }
/// <summary> /// Gets the most recent mentions (tweets containing the users's @screen_name) for the authenticating user. /// </summary> /// <param name="options">The options for the call to the API.</param> public TwitterTimelineResponse GetMentionsTimeline(TwitterTimelineOptions options) { return(TwitterTimelineResponse.ParseResponse(Raw.GetMentionsTimeline(options))); }
/// <summary> /// Gets the most recent mentions (tweets containing the users's @screen_name) for the authenticating user. /// </summary> /// <param name="count">The maximum amount of tweets to return.</param> public TwitterTimelineResponse GetMentionsTimeline(int count) { return(TwitterTimelineResponse.ParseResponse(Raw.GetMentionsTimeline(count))); }
/// <summary> /// Gets a collection of the most recent tweets and retweets posted by the authenticating /// user and the users they follow. /// </summary> public TwitterTimelineResponse GetHomeTimeline() { return(TwitterTimelineResponse.ParseResponse(Raw.GetHomeTimeline())); }
/// <summary> /// Gets the timeline of the user with the specified <code>userId</code>. /// </summary> /// <param name="screenName">The screen name of the user.</param> /// <param name="count">The maximum amount of tweets to return.</param> public TwitterTimelineResponse GetUserTimeline(string screenName, int count) { return(TwitterTimelineResponse.ParseResponse(Raw.GetUserTimeline(screenName, count))); }