Пример #1
0
    def __init__(self, acct):
        log.logger.debug('init')
        self.service = getbus("Service")

        if not acct.has_key("access_token"):
            raise exceptions.GwibberServiceError("keyring")
        self.account = acct

        pyyaru.ACCESS_TOKEN = acct["access_token"]
Пример #2
0
  def __init__(self, acct):
    self.service = util.getbus("Service")
    if acct.has_key("secret_token") and acct.has_key("password"): acct.pop("password")
    self.account = acct

    if not acct.has_key("access_token") and not acct.has_key("secret_token"):
      return [{"error": {"type": "auth", "account": self.account, "message": _("Failed to find credentials")}}]

    self.sigmethod = oauth.OAuthSignatureMethod_HMAC_SHA1()
    self.consumer = oauth.OAuthConsumer(*util.resources.get_twitter_keys())
    self.token = oauth.OAuthToken(acct["access_token"], acct["secret_token"])
  def __init__(self, acct):
    self.service = util.getbus("Service")
    if acct.has_key("access_token") and acct.has_key("password"):
        acct.pop("password")
    self.account = acct


    if not acct.has_key("access_token"):
        return [{"error": {
                    "type": "auth",
                    "account": self.account,
                    "message": _("Failed to find credentials")
                 }}]

    self.token = acct["access_token"]
    log.logger.debug("init done")
Пример #4
0
    def __init__(self, acct):
        self.service = util.getbus("Service")
        if acct.has_key("secret_token") and acct.has_key("password"):
            acct.pop("password")
        self.account = acct

        if not acct.has_key("access_token") and not acct.has_key(
                "secret_token"):
            return [{
                "error": {
                    "type": "auth",
                    "account": self.account,
                    "message": _("Failed to find credentials")
                }
            }]

        self.sigmethod = oauth.OAuthSignatureMethod_HMAC_SHA1()
        self.consumer = oauth.OAuthConsumer(*util.resources.get_twitter_keys())
        self.token = oauth.OAuthToken(acct["access_token"],
                                      acct["secret_token"])