ViewerLoginName returns the login name of the viewer.
()
| 1187 | |
| 1188 | // ViewerLoginName returns the login name of the viewer. |
| 1189 | func (c *Client) ViewerLoginName() (string, error) { |
| 1190 | var query viewerLogin |
| 1191 | err := c.doQueryWithProgressIndicator("Viewer", &query, map[string]interface{}{}) |
| 1192 | if err != nil { |
| 1193 | return "", err |
| 1194 | } |
| 1195 | return query.Viewer.Login, nil |
| 1196 | } |
| 1197 | |
| 1198 | // OwnerIDAndType returns the ID and OwnerType. The special login "@me" or an empty string queries the current user. |
| 1199 | func (c *Client) OwnerIDAndType(login string) (string, OwnerType, error) { |
no test coverage detected