add SDK methods for starting/stopping a stopwatch (#142)
This commit is contained in:
parent
b9e72373fb
commit
600c19aa03
1 changed files with 16 additions and 0 deletions
|
@ -139,6 +139,22 @@ func (c *Client) EditIssue(owner, repo string, index int64, opt EditIssueOption)
|
||||||
jsonHeader, bytes.NewReader(body), issue)
|
jsonHeader, bytes.NewReader(body), issue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// StartIssueStopWatch starts a stopwatch for an existing issue for a given
|
||||||
|
// repository
|
||||||
|
func (c *Client) StartIssueStopWatch(owner, repo string, index int64) error {
|
||||||
|
_, err := c.getResponse("POST", fmt.Sprintf("/repos/%s/%s/issues/%d/stopwatch/start", owner, repo, index),
|
||||||
|
jsonHeader, nil)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// StopIssueStopWatch stops an existing stopwatch for an issue in a given
|
||||||
|
// repository
|
||||||
|
func (c *Client) StopIssueStopWatch(owner, repo string, index int64) error {
|
||||||
|
_, err := c.getResponse("POST", fmt.Sprintf("/repos/%s/%s/issues/%d/stopwatch/stop", owner, repo, index),
|
||||||
|
jsonHeader, nil)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// EditDeadlineOption options for creating a deadline
|
// EditDeadlineOption options for creating a deadline
|
||||||
type EditDeadlineOption struct {
|
type EditDeadlineOption struct {
|
||||||
// required:true
|
// required:true
|
||||||
|
|
Loading…
Reference in a new issue