-
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.
- Loading branch information
Andrew Garner
committed
Sep 12, 2024
1 parent
e784ec8
commit 13d776f
Showing
2 changed files
with
29 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,28 @@ | ||
package client | ||
|
||
import ( | ||
"context" | ||
"net/http" | ||
) | ||
|
||
type UpsertHandOffTargetParams struct { | ||
// ID is your identifier of choice for this hand-off target. | ||
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" |