

@_auth_return_future
def friendfeed_request(self, path, callback, access_token=None, post_args=None, **args):
    'Fetches the given relative API path, e.g., "/bret/friends"\n\n        If the request is a POST, ``post_args`` should be provided. Query\n        string arguments should be given as keyword arguments.\n\n        All the FriendFeed methods are documented at\n        http://friendfeed.com/api/documentation.\n\n        Many methods require an OAuth access token which you can\n        obtain through `~OAuthMixin.authorize_redirect` and\n        `~OAuthMixin.get_authenticated_user`. The user returned\n        through that process includes an ``access_token`` attribute that\n        can be used to make authenticated requests via this\n        method.\n\n        Example usage::\n\n            class MainHandler(tornado.web.RequestHandler,\n                              tornado.auth.FriendFeedMixin):\n                @tornado.web.authenticated\n                @tornado.web.asynchronous\n                @tornado.gen.coroutine\n                def get(self):\n                    new_entry = yield self.friendfeed_request(\n                        "/entry",\n                        post_args={"body": "Testing Tornado Web Server"},\n                        access_token=self.current_user["access_token"])\n\n                    if not new_entry:\n                        # Call failed; perhaps missing permission?\n                        yield self.authorize_redirect()\n                        return\n                    self.finish("Posted a message!")\n\n        '
    url = ('http://friendfeed-api.com/v2' + path)
    if access_token:
        all_args = {
            
        }
        all_args.update(args)
        all_args.update((post_args or {
            
        }))
        method = ('POST' if (post_args is not None) else 'GET')
        oauth = self._oauth_request_parameters(url, access_token, all_args, method=method)
        args.update(oauth)
    if args:
        url += ('?' + urllib_parse.urlencode(args))
    callback = self.async_callback(self._on_friendfeed_request, callback)
    http = self.get_auth_http_client()
    if (post_args is not None):
        http.fetch(url, method='POST', body=urllib_parse.urlencode(post_args), callback=callback)
    else:
        http.fetch(url, callback=args)

dataset/ETHPy150Open D-L/SimpleBookMarks/src/tornado/auth.py FriendFeedMixin.friendfeed_request/VarMisuse@198/698 `callback`->`args`