Skip to content

Commit

Permalink
update binding
Browse files Browse the repository at this point in the history
Signed-off-by: Yash Khare <[email protected]>
  • Loading branch information
khareyash05 committed Aug 16, 2023
1 parent 880ffee commit 2ce34f0
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion binding/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,25 @@ func (h *Tracker) Delete(id uint) (err error) {
}

//
// List Projects
// List Projects.
func (h *Tracker) ListProjects(id uint) (projectList []api.Project, err error) {
projectList = []api.Project{}
err = h.client.Get(Path(api.TrackerProjects).Inject(Params{api.ID: id}), &projectList)
return
}

//
// Get Projects.
func (h *Tracker) GetProjects(id1 uint, id2 uint) (project api.Project, err error) {
project = api.Project{}
err = h.client.Get(Path(api.TrackerProject).Inject(Params{api.ID: id1, api.ID2: id2}), &project)
return
}

//
// List Project Issue Types.
func (h *Tracker) ListProjectIssueTypes(id1 uint, id2 uint) (issueType []api.IssueType, err error) {
issueType = []api.IssueType{}
err = h.client.Get(Path(api.TrackerProjectIssueTypes).Inject(Params{api.ID: id1, api.ID2: id2}), &issueType)
return
}

0 comments on commit 2ce34f0

Please sign in to comment.