public ActivityEntry Get(int? userId)
{
this.Manager.Method("activity.get");
if (userId != null)
{
this.Manager.Params("uid", userId);//((type == MessageType.Outgoing) ? "1" : "0"));;
}
string resp = this.Manager.Execute().GetResponseString();
if (this.Manager.MethodSuccessed)
{
XmlDocument x = this.Manager.GetXmlDocument(resp);
if (x.SelectSingleNode("/response").InnerText.Equals("0"))
{
return null;
}
XmlNode actNode = x.SelectSingleNode("/response");
ActivityEntry act = new ActivityEntry();
act.Id = Convert.ToInt32(actNode.SelectSingleNode("id").InnerText);
act.Text = actNode.SelectSingleNode("activity").InnerText;
act.Date = CommonUtils.FromUnixTime(actNode.SelectSingleNode("time").InnerText);
return act;
}
return null;
}