@@ -37,13 +37,21 @@ func New(c api.ApiClient) (a) {
37
37
}
38
38
39
39
// List all oTask/Activity records within a team
40
- func (r a ) GetList (company string , team string ) (* http.Response , []byte ) {
41
- return r .getByType (company , team , "" )
40
+ func (r a ) GetList (company string , team string , params ... map [string ]string ) (* http.Response , []byte ) {
41
+ var p map [string ]string
42
+ if params != nil {
43
+ p = params [0 ]
44
+ }
45
+ return r .getByType (company , team , "" , p )
42
46
}
43
47
44
48
// List all oTask/Activity records within a team by specified code(s)
45
- func (r a ) GetSpecificList (company string , team string , code string ) (* http.Response , []byte ) {
46
- return r .getByType (company , team , code )
49
+ func (r a ) GetSpecificList (company string , team string , code string , params ... map [string ]string ) (* http.Response , []byte ) {
50
+ var p map [string ]string
51
+ if params != nil {
52
+ p = params [0 ]
53
+ }
54
+ return r .getByType (company , team , code , p )
47
55
}
48
56
49
57
// Create an oTask/Activity record within a team
@@ -72,11 +80,11 @@ func (r a) UpdateBatch(company string, params map[string]string) (*http.Response
72
80
}
73
81
74
82
// Get by type
75
- func (r a ) getByType (company string , team string , code string ) (* http.Response , []byte ) {
83
+ func (r a ) getByType (company string , team string , code string , params map [ string ] string ) (* http.Response , []byte ) {
76
84
url := ""
77
85
if code != "" {
78
86
url = "/" + code ;
79
87
}
80
88
81
- return r .client .Get ("/otask/v1/tasks/companies/" + company + "/teams/" + team + "/tasks" + url , nil )
89
+ return r .client .Get ("/otask/v1/tasks/companies/" + company + "/teams/" + team + "/tasks" + url , params )
82
90
}
0 commit comments