forked from etcinit/gonduit
-
Notifications
You must be signed in to change notification settings - Fork 22
/
maniphest.go
58 lines (45 loc) · 1.4 KB
/
maniphest.go
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package gonduit
import (
"github.com/uber/gonduit/entities"
"github.com/uber/gonduit/requests"
"github.com/uber/gonduit/responses"
)
// ManiphestQuery performs a call to maniphest.query.
func (c *Conn) ManiphestQuery(
req requests.ManiphestQueryRequest,
) (*responses.ManiphestQueryResponse, error) {
var res responses.ManiphestQueryResponse
if err := c.Call("maniphest.query", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// ManiphestCreateTask performs a call to maniphest.createtask.
func (c *Conn) ManiphestCreateTask(
req requests.ManiphestCreateTaskRequest,
) (*entities.ManiphestTask, error) {
var res entities.ManiphestTask
if err := c.Call("maniphest.createtask", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
func (c *Conn) ManiphestGetTaskTransactions(
req requests.ManiphestGetTaskTransactions,
) (*responses.ManiphestGetTaskTransactionsResponse, error) {
var res responses.ManiphestGetTaskTransactionsResponse
if err := c.Call("maniphest.gettasktransactions", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// ManiphestSearch performs a call to maniphest.search.
func (c *Conn) ManiphestSearch(
req requests.ManiphestSearchRequest,
) (*responses.ManiphestSearchResponse, error) {
var res responses.ManiphestSearchResponse
if err := c.Call("maniphest.search", &req, &res); err != nil {
return nil, err
}
return &res, nil
}