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