ViewerLoginName returns the login name of the viewer.
()
| 1228 | |
| 1229 | // ViewerLoginName returns the login name of the viewer. |
| 1230 | func (c *Client) ViewerLoginName() (string, error) { |
| 1231 | var query viewerLogin |
| 1232 | err := c.doQueryWithProgressIndicator("Viewer", &query, map[string]any{}) |
| 1233 | if err != nil { |
| 1234 | return "", err |
| 1235 | } |
| 1236 | return query.Viewer.Login, nil |
| 1237 | } |
| 1238 | |
| 1239 | // OwnerIDAndType returns the ID and OwnerType. The special login "@me" or an empty string queries the current user. |
| 1240 | func (c *Client) OwnerIDAndType(login string) (string, OwnerType, error) { |
no test coverage detected