forked from jpoehls/go-conduit
-
Notifications
You must be signed in to change notification settings - Fork 17
/
maniphest.go
45 lines (35 loc) · 1.09 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
package gonduit
import (
"github.com/etcinit/gonduit/entities"
"github.com/etcinit/gonduit/requests"
"github.com/etcinit/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
}