Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions oAuthTwitterWrapper/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<add key="oAuthConsumerSecret" value="Secret"/>
<add key="oAuthUrl" value="https://api.twitter.com/oauth2/token"/>
<add key="timelineFormat" value="https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name={0}&amp;include_rts={1}&amp;exclude_replies={2}&amp;count={3}"/>
<add key="timeline_since_id" value="0"/>
<add key="screenname" value="screenname"/>
<add key="include_rts" value="1"/>
<add key="exclude_replies" value="0"/>
Expand Down
1 change: 1 addition & 0 deletions oAuthTwitterWrapper/ITimeLineSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ public interface ITimeLineSettings
string ScreenName { get; set; }
string TimelineFormat { get; set; }
string TimelineUrl { get; }
string Since_ID { get; set; }
}
}
6 changes: 4 additions & 2 deletions oAuthTwitterWrapper/OAuthTwitterWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ public OAuthTwitterWrapper()
string include_rts = ConfigurationManager.AppSettings["include_rts"];
string exclude_replies = ConfigurationManager.AppSettings["exclude_replies"];
int count = Convert.ToInt16(ConfigurationManager.AppSettings["count"]);
string timelineFormat = ConfigurationManager.AppSettings["timelineFormat"];
string timelineFormat = ConfigurationManager.AppSettings["timelineFormat"];
string since_id = ConfigurationManager.AppSettings["timeline_since_id"];
TimeLineSettings = new TimeLineSettings
{
ScreenName = screenname,
IncludeRts = include_rts,
ExcludeReplies = exclude_replies,
Count = count,
TimelineFormat = timelineFormat
TimelineFormat = timelineFormat,
Since_ID = since_id
};
string searchFormat = ConfigurationManager.AppSettings["searchFormat"];
string searchQuery = ConfigurationManager.AppSettings["searchQuery"];
Expand Down
11 changes: 10 additions & 1 deletion oAuthTwitterWrapper/TimeLineSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@ public class TimeLineSettings : ITimeLineSettings
public string ExcludeReplies { get; set; }
public int Count { get; set; }
public string TimelineFormat { get; set; }
public string Since_ID { get; set; }
public string TimelineUrl
{
get
{
return string.Format(TimelineFormat, ScreenName, IncludeRts, ExcludeReplies, Count);
if (Since_ID != "0")
{
return string.Format(TimelineFormat, ScreenName, IncludeRts, ExcludeReplies, Count);
}
else
{
return string.Format(TimelineFormat + "&amp;since_id={4}", ScreenName, IncludeRts, ExcludeReplies, Count, Since_ID);
}

}
}
}
Expand Down