def get(self):
    session = get_current_session()

    fetcher = SteamUserDataFetcher()
    user_id = self.request.get('openid.claimed_id').split("/")[-1]
    if fetcher.isValidId64(user_id):
      session['profile_id'] = user_id
    else:
      logging.warning("Steam ID: %s" % user_id)

    self.redirect('/')
Example #2
0
    def get(self):
        url = self.request.url
        user = users.get_current_user()
        session = get_current_session()

        fetcher = SteamUserDataFetcher()

        if session.has_key("profile_id"):
            details = fetcher.get_user_details(session["profile_id"])
        else:
            details = {}

        path = os.path.join(os.path.dirname(__file__), "../views", "index.html")
        self.response.out.write(template.render(path, {"nickname": user.nickname(), "details": details, "url": url}))
Example #3
0
  def post(self):
    user = users.get_current_user()

    text_input = self.request.get('steamid').strip()

    fetcher = SteamUserDataFetcher()
    details = fetcher.get_user_details(text_input)

    path = os.path.join(os.path.dirname(__file__), '../views', 'index.html')
    self.response.out.write(
        template.render(path, {
          'input': text_input,
          'nickname': user.nickname(),
          'details': details
          })
        )