C# Class Smrf.SocialNetworkLib.Twitter.TwitterUtil

Provides utility methods for getting social networks from Twitter.
Show file Open project: 2014-sed-team3/term-project Class Usage Examples

Public Methods

Method Description
EncodeUrlParameter ( String urlParameter ) : String
EnumerateJsonValues ( String url, String jsonName, Int32 maximumValues, System.Boolean skipMostPage1Errors, RequestStatistics requestStatistics, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : IEnumerable
EnumerateSearchStatuses ( String searchTerm, Int32 maximumStatuses, RequestStatistics requestStatistics, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : Object>>.IEnumerable
EnumerateUserValueDictionaries ( String userIDsOrScreenNames, System.Boolean userIDsSpecified, RequestStatistics requestStatistics, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : Object>>.IEnumerable
GetTwitterResponseAsString ( String url, RequestStatistics requestStatistics, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : String
OnExceptionWhileEnumeratingJsonValues ( Exception exception, Int32 iPage, System.Boolean bSkipMostPage1Errors ) : void
TwitterUtil ( String twitterAccessToken, String twitterAccessTokenSecret, String userAgent, Int32 timeoutMs ) : System

Initializes a new instance of the TwitterUtil class.

WebExceptionIsDueToRateLimit ( WebException webException ) : System.Boolean

Private Methods

Method Description
AppendCursorToUrl ( String sUrl, String sCursor ) : String
AssertValid ( ) : void
GetRateLimitPauseMs ( WebException oWebException ) : Int32
GetSearchUrl ( String sSearchTerm, String sQueryParametersForNextPage ) : String
TryGetQueryParametersForNextSearchPage ( Object>.Dictionary oResponseDictionary, String &sQueryParametersForNextPage ) : System.Boolean

Method Details

EncodeUrlParameter() public static method

public static EncodeUrlParameter ( String urlParameter ) : String
urlParameter String
return String

EnumerateJsonValues() public method

public EnumerateJsonValues ( String url, String jsonName, Int32 maximumValues, System.Boolean skipMostPage1Errors, RequestStatistics requestStatistics, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : IEnumerable
url String
jsonName String
maximumValues System.Int32
skipMostPage1Errors System.Boolean
requestStatistics RequestStatistics
reportProgressHandler ReportProgressHandler
checkCancellationPendingHandler CheckCancellationPendingHandler
return IEnumerable

EnumerateSearchStatuses() public method

public EnumerateSearchStatuses ( String searchTerm, Int32 maximumStatuses, RequestStatistics requestStatistics, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : Object>>.IEnumerable
searchTerm String
maximumStatuses System.Int32
requestStatistics RequestStatistics
reportProgressHandler ReportProgressHandler
checkCancellationPendingHandler CheckCancellationPendingHandler
return Object>>.IEnumerable

EnumerateUserValueDictionaries() public method

public EnumerateUserValueDictionaries ( String userIDsOrScreenNames, System.Boolean userIDsSpecified, RequestStatistics requestStatistics, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : Object>>.IEnumerable
userIDsOrScreenNames String
userIDsSpecified System.Boolean
requestStatistics RequestStatistics
reportProgressHandler ReportProgressHandler
checkCancellationPendingHandler CheckCancellationPendingHandler
return Object>>.IEnumerable

GetTwitterResponseAsString() public method

public GetTwitterResponseAsString ( String url, RequestStatistics requestStatistics, ReportProgressHandler reportProgressHandler, CheckCancellationPendingHandler checkCancellationPendingHandler ) : String
url String
requestStatistics RequestStatistics
reportProgressHandler ReportProgressHandler
checkCancellationPendingHandler CheckCancellationPendingHandler
return String

OnExceptionWhileEnumeratingJsonValues() public static method

public static OnExceptionWhileEnumeratingJsonValues ( Exception exception, Int32 iPage, System.Boolean bSkipMostPage1Errors ) : void
exception System.Exception
iPage System.Int32
bSkipMostPage1Errors System.Boolean
return void

TwitterUtil() public method

Initializes a new instance of the TwitterUtil class.
public TwitterUtil ( String twitterAccessToken, String twitterAccessTokenSecret, String userAgent, Int32 timeoutMs ) : System
twitterAccessToken String /// The Twitter access token to use. ///
twitterAccessTokenSecret String /// The Twitter access token secret to use. ///
userAgent String /// The user agent string to use for web requests. ///
timeoutMs System.Int32 /// Timeout to use for web requests, in milliseconds. ///
return System

WebExceptionIsDueToRateLimit() public static method

public static WebExceptionIsDueToRateLimit ( WebException webException ) : System.Boolean
webException System.Net.WebException
return System.Boolean