public SearchResults Search(string keyword) { TwitterSearchClient client = new TwitterSearchClient(_username, _password); SearchResults results = null; try { results = client.Search(keyword); client.Close(); } catch (Exception ex) { client.Abort(); } return(results); }
void Search_DoWork(object sender, DoWorkEventArgs e) { // get search keyword string keyword = e.Argument as string; // twitter search TwitterSearchClient client = new TwitterSearchClient(_username, _password); try { e.Result = client.Search(keyword, _page); client.Close(); } catch (Exception ex) { client.Abort(); } }
void Refresh_DoWork(object sender, DoWorkEventArgs e) { // get search keyword string keyword = e.Argument as string; // twitter search TwitterSearchClient client = new TwitterSearchClient(_username, _password); try { string tweetId = GetTweetId(_searchResults[0].Id); e.Result = client.Search(keyword, tweetId); client.Close(); } catch (Exception ex) { client.Abort(); } }
public SearchResults Search(string keyword) { TwitterSearchClient client = new TwitterSearchClient(_username, _password); SearchResults results = null; try { results = client.Search(keyword); client.Close(); } catch (Exception ex) { client.Abort(); } return results; }