Exemplo n.º 1
0
 def request_static_tile(error, *args):
     # Request using the PreAuthURL didn't work, try with static tilephoto
     scheme, host, port, resource = url_split(user_tile_url)
     if host:
         self.get_resource(scheme, host, resource, callback, errback)
     else:
         run(errback, error, None)
Exemplo n.º 2
0
 def request_static_tile(error, *args):
     # Request using the PreAuthURL didn't work, try with static tilephoto
     scheme, host, port, resource = url_split(user_tile_url)
     if host:
         self.get_resource(scheme, host, resource, callback, errback)
     else:
         run(errback, error, None)
Exemplo n.º 3
0
    def get_display_picture(self, callback, errback, pre_auth_url, user_tile_url):
        token = str(self._tokens[LiveService.STORAGE])

        def request_static_tile(error):
            # Request using the PreAuthURL didn't work, try with static tilephoto
            scheme, host, port, resource = url_split(user_tile_url)
            self.get_resource(scheme, host, resource, callback, errback)

        scheme, host, port, resource = url_split(pre_auth_url)
        resource += '?t=' + urllib.quote(token.split('&')[0][2:], '')
        self.get_resource(scheme, host, resource, callback,
                (request_static_tile,))
Exemplo n.º 4
0
    def get_display_picture(self, callback, errback, pre_auth_url,
                            user_tile_url):
        token = str(self._tokens[LiveService.STORAGE])

        def request_static_tile(error, *args):
            # Request using the PreAuthURL didn't work, try with static tilephoto
            scheme, host, port, resource = url_split(user_tile_url)
            if host:
                self.get_resource(scheme, host, resource, callback, errback)
            else:
                run(errback, error, None)

        scheme, host, port, resource = url_split(pre_auth_url)
        resource += '?t=' + urllib.quote(token.split('&')[0][2:], '')
        self.get_resource(scheme, host, resource, callback,
                          (request_static_tile, ))