Thank you Joe. I am embarrassed to admit that I hadn't made the connection between the Linq2Twitter API and the underlying Twitter API and had 'assumed' that I could simply query against any attributes of the collection.
Having played around, I haven't been able to find an API call that does exactly what I want, i.e. return tweets originated by a specific account with all replies and re-tweets excluded. The only way I have found is to make the initial API call to get a local
data set and then filter that data to give the result:
using (var twitterCtx = new TwitterContext(auth))
// Get the initial data set using the API call
var queryResults = twitterCtx.Status
.Where(s => (
(s.Type == StatusType.User) &&
(s.ScreenName == search) &&
(s.ExcludeReplies == true) &&
(s.IncludeMyRetweet == false) &&
(s.Count == initialDataCount)
// Now filter the API results
.Where(s => (
(s.RetweetCount < 1)
The problem with this is, of course, getting the right ratio of initial data count to result count to ensure that there are enough target records included in the data. This makes this approach somewhat expensive in terms of returning more data than you actually
need and somewhat fragile.
I am hoping that I have missed something obvious and that there is a better approach - any suggestions would be much appreciated.