ChimeraCoder/anaconda — pull request #12 by yanatan16 (2013-11-21 17:44:36+00:00)
Title: Add two methods including VerifyCredentials. Add Rate Limit checking capability.

Two methods were added to `TwitterApi`: `GetSelf()` and `VerifyCredentials()` which both request at `/account/verify_credentials`

Errors thrown by `decodeResponse` are of a new type: `*ApiError` which returns the same string as legacy to `err.Error()`. But, this new error type can now be used to determine Rate Limit errors:

```go
if apiError, ok := err.(*ApiError); ok {
if rateLimited, nextWindow := apiError.RateLimitCheck(); rateLimited {
time.Sleep(nextWindow.Sub(time.Now()))
} else {
panic(err)
}
} else {
panic(err)
}
```