GetDebug fetches the current debug setting.
()
| 338 | |
| 339 | // GetDebug fetches the current debug setting. |
| 340 | func (c *Client) GetDebug() (bool, error) { |
| 341 | wrapper, err := c.getJSON("/v0/management/debug") |
| 342 | if err != nil { |
| 343 | return false, err |
| 344 | } |
| 345 | if v, ok := wrapper["debug"]; ok { |
| 346 | if b, ok := v.(bool); ok { |
| 347 | return b, nil |
| 348 | } |
| 349 | } |
| 350 | return false, nil |
| 351 | } |
| 352 | |
| 353 | // GetAuthStatus polls the OAuth session status. |
| 354 | // Returns status ("wait", "ok", "error") and optional error message. |