public override string Update(string status, string in_reply_to_status_id, UserLocation location, OutputFormatType format) { return null; // if (this.PlaceID != null) /*string url = string.Format("http://brightkite.com/places/{0}/notes", this.PlaceID); string data = string.Format("note[body]={0}", System.Web.HttpUtility.UrlEncode(status)); return ExecutePostCommand(url, data);*/ }
public override string Update(string status, string in_reply_to_status_id, UserLocation location, OutputFormatType format) { string url = "http://api.ping.fm/v1/user.post"; //string data = string.Format("user_app_key={0}&api_key={1}&post_method=microblog&body={2}", this.AccountInfo.UserName,this.AccountInfo.Password,HttpUtility.UrlEncode(status)); string data = string.Format("user_app_key={0}&api_key={1}&post_method=default&body={2}", this.AccountInfo.UserName, this.AccountInfo.Password, System.Web.HttpUtility.UrlEncode(status)); if (location != null) { data += "&location=" + location.ToString(); } return ExecutePostCommand(url, data); }
public virtual string Update(string status, string in_reply_to_status_id, UserLocation location, OutputFormatType format) { if (format != OutputFormatType.JSON && format != OutputFormatType.XML) { throw new ArgumentException("Update support only XML and JSON output format", "format"); } string url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Update), GetFormatTypeString(format), AccountInfo.ServerURL.URL); string data = string.Format("status={0}", System.Web.HttpUtility.UrlEncode(status)); if (location != null) { if (location.Position != null) { data += string.Format("&lat={0}&long={1}", location.Position.Lat.ToString(CultureInfo.InvariantCulture), location.Position.Lon.ToString(CultureInfo.InvariantCulture)); } } if (!string.IsNullOrEmpty(in_reply_to_status_id)) { data = data + "&in_reply_to_status_id=" + in_reply_to_status_id; } return ExecutePostCommand(url, data); }
public string Update(string status, UserLocation location, OutputFormatType format) { return Update(status, null, location, format); }
public XmlDocument UpdateAsXML(string text, UserLocation location) { string output = Update(text, location, OutputFormatType.XML); if (!string.IsNullOrEmpty(output)) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(output); return xmlDocument; } return null; }
public string UpdateAsJSON(string text, UserLocation location) { return Update(text, location, OutputFormatType.JSON); }