Add doc comments to api package

This commit is contained in:
2021-10-22 21:01:18 -07:00
parent 80a5867d6b
commit d7057e3f9c
4 changed files with 37 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import (
"go.arsenm.dev/itd/internal/types"
)
// SetTime sets the given time on the connected device
func (c *Client) SetTime(t time.Time) error {
_, err := c.request(types.Request{
Type: types.ReqTypeSetTime,
@@ -17,6 +18,9 @@ func (c *Client) SetTime(t time.Time) error {
return nil
}
// SetTimeNow sets the time on the connected device to
// the current time. This is more accurate than
// SetTime(time.Now()) due to RFC3339 formatting
func (c *Client) SetTimeNow() error {
_, err := c.request(types.Request{
Type: types.ReqTypeSetTime,