forked from LeanKit/LeanKit.API.Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTemplate.cs
More file actions
32 lines (28 loc) · 750 Bytes
/
Template.cs
File metadata and controls
32 lines (28 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Threading.Tasks;
using LeanKit.Extensions;
using LeanKit.Models;
namespace LeanKit.API
{
public class Template
{
private readonly Client _client;
public Template(Client client)
{
_client = client;
}
public async Task<TemplateListResponse> List()
{
return await _client.Request<TemplateListResponse>("io/template");
}
public async Task<TemplateCreateResponse> Create(TemplateCreateRequest request)
{
var body = request.ToJSON();
return await _client.Request<TemplateCreateResponse>("io/template", "post", null, body);
}
public async Task Delete(long templateId)
{
await _client.Request<string>(string.Format("/io/template/{0}", templateId), "DELETE");
}
}
}