Пример #1
0
 def get(self):
     data = fetch_line_status_as_json()
     json_data = json.dumps(data)
     line_status = LineStatus.current_status()
     old_json_data = line_status.json_data
     line_status.set_json_data(json_data)
     if old_json_data is None:
         line_status.put()
     elif old_json_data != json_data:
         line_status.put()
         check_for_modifications(data, json_data, old_json_data)
Пример #2
0
 def get(self):
   data = fetch_line_status_as_json()
   json_data = json.dumps(data)
   line_status = LineStatus.current_status()
   old_json_data = line_status.json_data
   line_status.set_json_data(json_data)
   if old_json_data is None:
     line_status.put()
   elif old_json_data != json_data:
     line_status.put()
     check_for_modifications(data, json_data, old_json_data)
    def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        status = LineStatus.current_status()

        self.response.headers['X-TflTravelAlerts-date'] = str(status.date)
        self.response.write(status.json_data)
Пример #4
0
  def get(self):
    self.response.headers['Content-Type'] = 'text/plain'
    status = LineStatus.current_status()

    self.response.headers['X-TflTravelAlerts-date'] = str(status.date)
    self.response.write(status.json_data)