MCPcopy
hub / github.com/tornadoweb/tornado / get

Method get

tornado/test/auth_test.py:234–248  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

232class 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
251class TwitterServerAccessTokenHandler(RequestHandler):

Callers

nothing calls this directly

Calls 4

twitter_requestMethod · 0.80
get_argumentMethod · 0.80
set_statusMethod · 0.80
finishMethod · 0.45

Tested by

no test coverage detected