MCPcopy Create free account
hub / github.com/EasyIME/PIME / get

Method get

python/python3/tornado/test/auth_test.py:224–238  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

222class 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
241class 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