Наследование: BaseModel
Пример #1
0
        public Comment Create(Comment comment)
        {
            var request = new RestRequest("comments.xml", Method.POST) { XmlSerializer = new XmlIgnoreSerializer() };
            request.AddBody(comment);

            var response = _client.Execute<Comment>(request);
            return response.Data;
        }
Пример #2
0
        public bool Update(Comment comment)
        {
            var request = new RestRequest("comments/{id}.xml", Method.PUT) { XmlSerializer = new XmlIgnoreSerializer() };
            request.AddParameter("id", comment.Id, ParameterType.UrlSegment);
            request.AddBody(comment);

            var response = _client.Execute<Kase>(request);
            return response.StatusCode == HttpStatusCode.OK;
        }