コード例 #1
0
ファイル: __init__.py プロジェクト: codingjester/pytumblr
    def __init__(self,
                 consumer_key,
                 consumer_secret="",
                 oauth_token="",
                 oauth_secret="",
                 host="http://api.tumblr.com"):
        """
        Initializes the TumblrRestClient object, creating the TumblrRequest
        object which deals with all request formatting.

        :param consumer_key: a string, the consumer key of your
                             Tumblr Application
        :param consumer_secret: a string, the consumer secret of
                                your Tumblr Application
        :param oauth_token: a string, the user specific token, received
                            from the /access_token endpoint
        :param oauth_secret: a string, the user specific secret, received
                             from the /access_token endpoint
        :param host: the host that are you trying to send information to,
                     defaults to http://api.tumblr.com

        :returns: None
        """
        self.request = TumblrRequest(consumer_key, consumer_secret,
                                     oauth_token, oauth_secret, host)