(self)
| 222 | class TwitterClientShowUserHandler(TwitterClientHandler): |
| 223 | @gen.coroutine |
| 224 | def get(self): |
| 225 | # TODO: would be nice to go through the login flow instead of |
| 226 | # cheating with a hard-coded access token. |
| 227 | try: |
| 228 | response = yield self.twitter_request( |
| 229 | "/users/show/%s" % self.get_argument("name"), |
| 230 | access_token=dict(key="hjkl", secret="vbnm"), |
| 231 | ) |
| 232 | except HTTPClientError: |
| 233 | # TODO(bdarnell): Should we catch HTTP errors and |
| 234 | # transform some of them (like 403s) into AuthError? |
| 235 | self.set_status(500) |
| 236 | self.finish("error from twitter request") |
| 237 | else: |
| 238 | self.finish(response) |
| 239 | |
| 240 | |
| 241 | class TwitterServerAccessTokenHandler(RequestHandler): |
nothing calls this directly
no test coverage detected