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