Inheritance: BaseModel
示例#1
0
        public Task Create(Task task)
        {
            var request = new RestRequest("tasks.xml", Method.POST) { XmlSerializer = new XmlSerializer() { DateFormat = "yyyy-MM-ddTHH:mm:sszz" } };
            request.AddBody(task);

            var response = _client.Execute<Task>(request);
            return response.Data;
        }
示例#2
0
        public Task Update(Task task)
        {
            var request = new RestRequest(String.Format("tasks/{0}.xml?reload=true", task.Id), Method.PUT) { XmlSerializer = new XmlIgnoreSerializer() };
            request.AddBody(task);

            var response = _client.Execute<Task>(request);
            return response.Data;
        }