Add 7 missing SDK methods and fix README type name
- Fix AgentKeyRequest → RegisterAgentKeyInput in README - Add ListAgents, UnfreezeAgent, DeleteAgent to agents.go - Add GetMe, IssueApiToken to auth.go - Add DownloadExport to exports.go - Add Health package-level function in health.go - Add corresponding types and document all exports in README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0fdedb7247
commit
c21e9fcfc6
6 files changed
+245
-3
No files matched your search
@@ -122,3 +122,21 @@ func authPost(baseURL, path string, body interface{}, result interface{}) error
|
||||
Message: string(respBody),
|
||||
}
|
||||
}
|
||||
|
||||
// GetMe retrieves the current authenticated user's profile.
|
||||
func (c *Client) GetMe() (*GetMeResponse, error) {
|
||||
var result GetMeResponse
|
||||
if err := c.doGet("/v1/auth/me", &result); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// IssueApiToken creates a new API token with an optional TTL.
|
||||
func (c *Client) IssueApiToken(req *IssueApiTokenRequest) (*IssueApiTokenResponse, error) {
|
||||
var result IssueApiTokenResponse
|
||||
if err := c.doPost("/v1/auth/token", req, &result); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &result, nil
|
||||
}
|
||||
Reference in new issue
Block a user