forked from etcinit/gonduit
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmaniphest.go
77 lines (63 loc) · 2.41 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package gonduit
import (
"github.com/thought-machine/gonduit/entities"
"github.com/thought-machine/gonduit/requests"
"github.com/thought-machine/gonduit/responses"
)
// ManiphestQuery performs a call to maniphest.query.
// Deprecated: This method is frozen and will eventually be deprecated. New code should use "maniphest.search" instead.
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.
// Deprecated: This method is frozen and will eventually be deprecated. New code should use "maniphest.edit" instead.
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
}
// ManiphestGetTaskTransactions performs a call to maniphest.gettasktransactions
// Deprecated: This method is frozen and will eventually be deprecated. New code should use "transaction.search" instead.
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.SearchRequest) (*responses.SearchResponse, error) {
var res responses.SearchResponse
if err := c.Call("maniphest.search", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// ManiphestStatusSearch performs a call to maniphest.status.search
func (c *Conn) ManiphestStatusSearch(req requests.SearchRequest) (*responses.SearchResponse, error) {
var res responses.SearchResponse
if err := c.Call("maniphest.status.search", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// ManiphestEdit performs a call to maniphest.edit
func (c *Conn) ManiphestEdit(req requests.EditRequest) (*responses.EditResponse, error) {
var res responses.EditResponse
if err := c.Call("maniphest.edit", &req, &res); err != nil {
return nil, err
}
return &res, nil
}