CsharpTwitt - REST API Methods (Status Methods)
Show Statuses method support XML and JSON format.
Returns a single status, specified by the id parameter below. The status's author will be returned inline.
Requires Authentication : false, unless the author of the status is protected
Example
Twitter.PublicTwitt pubTwitt = new Twitter.PublicTwitt();
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusIDtoRetrieve = "<Numeric Status Id>";
strResult = pubTwitt.Show_Status(strStatusIDtoRetrieve, Twitter.OutputFormatType.xml);
xmlResult = pubTwitt.Show_StatusAsXML(strStatusIDtoRetrieve);
strResult = pubTwitt.Show_StatusAsJSON(strStatusIDtoRetrieve);
//With Authentication
strResult = userTwitt.Show_Status(strUsername, strPassword, strStatusIDtoRetrieve, Twitter.OutputFormatType.xml);
xmlResult = userTwitt.Show_StatusAsXML(strUsername, strPassword, strStatusIDtoRetrieve);
strResult = userTwitt.Show_StatusAsJSON(strUsername, strPassword, strStatusIDtoRetrieve);
Update Statuses method support XML and JSON format.
Updates the authenticating user's status. Requires the status parameter specified below. Request must be a POST. A status update with text identical to the authenticating user's current status will be ignored to prevent duplicates.
Requires Authentication : true
Example
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusTexttoUpdate = "Status Updtated from API";
strResult = userTwitt.UpdateStatus(strUsername, strPassword, strStatusTexttoUpdate, Twitter.OutputFormatType.xml);
strResult = userTwitt.UpdateStatusAsJSON(strUsername, strPassword, strStatusTexttoUpdate);
xmlResult = userTwitt.UpdateStatusAsXML(strUsername, strPassword, strStatusTexttoUpdate);
Destroy Statuses method support XML and JSON format.
Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status.
Requires Authentication : true
Example
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusIDtoDestroy = "<Numeric Status Id of ur own status>";
strResult = userTwitt.DestroyStatus(strUsername, strPassword, strStatusIDtoDestroy, Twitter.OutputFormatType.xml);
strResult = userTwitt.DestroyStatusAsJSON(strUsername, strPassword, strStatusIDtoDestroy);
xmlResult = userTwitt.DestroyStatusAsXML(strUsername, strPassword, strStatusIDtoDestroy);
Retweet Statuses method support XML and JSON format.
Retweets a tweet. Requires the id parameter of the tweet you are retweeting. Request must be a POST or PUT. Returns the original tweet with retweet details embedded.
Requires Authentication : true
Example
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusIDtoRetweet = "<Numeric Status Id>";
strResult = userTwitt.Retweet(strUsername, strPassword, strStatusIDtoRetweet , Twitter.OutputFormatType.xml);
strResult = userTwitt.RetweetAsJSON(strUsername, strPassword, strStatusIDtoRetweet);
xmlResult = userTwitt.RetweetAsXML(strUsername, strPassword, strStatusIDtoRetweet);
Retweets Statuses method support XML and JSON format.
Returns up to 100 of the first retweets of a given tweet.
Requires Authentication : true
Example
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusIDtoRetweets = "<Numeric Status Id>";
strResult = userTwitt.Retweets(strUsername, strPassword, strStatusIDtoRetweets , Twitter.OutputFormatType.xml);
strResult = userTwitt.RetweetsAsJSON(strUsername, strPassword, strStatusIDtoRetweets );
xmlResult = userTwitt.RetweetsAsXML(strUsername, strPassword, strStatusIDtoRetweets );
Returns a single status, specified by the id parameter below. The status's author will be returned inline.
Requires Authentication : false, unless the author of the status is protected
Example
Twitter.PublicTwitt pubTwitt = new Twitter.PublicTwitt();
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusIDtoRetrieve = "<Numeric Status Id>";
strResult = pubTwitt.Show_Status(strStatusIDtoRetrieve, Twitter.OutputFormatType.xml);
xmlResult = pubTwitt.Show_StatusAsXML(strStatusIDtoRetrieve);
strResult = pubTwitt.Show_StatusAsJSON(strStatusIDtoRetrieve);
//With Authentication
strResult = userTwitt.Show_Status(strUsername, strPassword, strStatusIDtoRetrieve, Twitter.OutputFormatType.xml);
xmlResult = userTwitt.Show_StatusAsXML(strUsername, strPassword, strStatusIDtoRetrieve);
strResult = userTwitt.Show_StatusAsJSON(strUsername, strPassword, strStatusIDtoRetrieve);
Update Statuses method support XML and JSON format.
Updates the authenticating user's status. Requires the status parameter specified below. Request must be a POST. A status update with text identical to the authenticating user's current status will be ignored to prevent duplicates.
Requires Authentication : true
Example
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusTexttoUpdate = "Status Updtated from API";
strResult = userTwitt.UpdateStatus(strUsername, strPassword, strStatusTexttoUpdate, Twitter.OutputFormatType.xml);
strResult = userTwitt.UpdateStatusAsJSON(strUsername, strPassword, strStatusTexttoUpdate);
xmlResult = userTwitt.UpdateStatusAsXML(strUsername, strPassword, strStatusTexttoUpdate);
Destroy Statuses method support XML and JSON format.
Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status.
Requires Authentication : true
Example
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusIDtoDestroy = "<Numeric Status Id of ur own status>";
strResult = userTwitt.DestroyStatus(strUsername, strPassword, strStatusIDtoDestroy, Twitter.OutputFormatType.xml);
strResult = userTwitt.DestroyStatusAsJSON(strUsername, strPassword, strStatusIDtoDestroy);
xmlResult = userTwitt.DestroyStatusAsXML(strUsername, strPassword, strStatusIDtoDestroy);
Retweet Statuses method support XML and JSON format.
Retweets a tweet. Requires the id parameter of the tweet you are retweeting. Request must be a POST or PUT. Returns the original tweet with retweet details embedded.
Requires Authentication : true
Example
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusIDtoRetweet = "<Numeric Status Id>";
strResult = userTwitt.Retweet(strUsername, strPassword, strStatusIDtoRetweet , Twitter.OutputFormatType.xml);
strResult = userTwitt.RetweetAsJSON(strUsername, strPassword, strStatusIDtoRetweet);
xmlResult = userTwitt.RetweetAsXML(strUsername, strPassword, strStatusIDtoRetweet);
Retweets Statuses method support XML and JSON format.
Returns up to 100 of the first retweets of a given tweet.
Requires Authentication : true
Example
Twitter.UserTwitt userTwitt = new Twitter.UserTwitt();
string strResult = "";
XmlDocument xmlResult = null;
string strUsername = "TwitterUsername";
string strPassword = "TwitterPassword";
string strStatusIDtoRetweets = "<Numeric Status Id>";
strResult = userTwitt.Retweets(strUsername, strPassword, strStatusIDtoRetweets , Twitter.OutputFormatType.xml);
strResult = userTwitt.RetweetsAsJSON(strUsername, strPassword, strStatusIDtoRetweets );
xmlResult = userTwitt.RetweetsAsXML(strUsername, strPassword, strStatusIDtoRetweets );
Comments