-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package client | ||
|
||
import ( | ||
"context" | ||
"net/http" | ||
) | ||
|
||
type UpsertHandOffTargetParams struct { | ||
// ID is your identifier of choice for this hand-off target. Can be anything consisting | ||
// of letters, numbers, or any of the following characters: `_` `-` `+` `=`. | ||
ID string `json:"id"` | ||
|
||
// Name is the hand-off target’s name. This cannot be nil. | ||
Name string `json:"name"` | ||
} | ||
|
||
// UpsertHandOffTarget inserts or updates a hand-off target | ||
func (c *Client) UpsertHandOffTarget(ctx context.Context, p *UpsertHandOffTargetParams) error { | ||
rsp, err := c.makeRequest(ctx, http.MethodPost, "hand-off-targets", p) | ||
if err != nil { | ||
return err | ||
} | ||
defer rsp.Body.Close() | ||
|
||
if err := responseError(rsp); err != nil { | ||
return err | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package client | ||
|
||
const version = "0.1.1" | ||
const version = "0.2.0" |