示例#1
0
    def post(self):
        import event

        channel_id = self.request.get('from')

        event.subscribe('ACTIVITY', channel_id)
        event.subscribe('SUMMARY-%s' % channel_id, channel_id)
示例#2
0
    def post(self):
        import event

        channel_id = self.request.get('from')

        event.subscribe('ACTIVITY', channel_id)
        event.subscribe('SUMMARY-%s' % channel_id, channel_id)
示例#3
0
    def get(self):
        from google.appengine.api import channel

        from uuid import uuid4

        user_id = users.get_current_user().user_id()

        channel_id = user_id + uuid4().hex

        token = channel.create_channel(channel_id)

        # We will send Activity to everyone
        event.subscribe("ACTIVITY", channel_id)
        # We will send results from aggregations just to the
        # user who created the data.
        event.subscribe("SUMMARY-%s" % user_id, channel_id)

        self.response.out.write(json.dumps({"token": token}))
示例#4
0
    def get(self):
        from google.appengine.api import channel

        from uuid import uuid4

        user_id = users.get_current_user().user_id()

        channel_id = user_id + uuid4().hex

        token = channel.create_channel(channel_id)

        # We will send Activity to everyone
        event.subscribe("ACTIVITY", channel_id)
        # We will send results from aggregations just to the
        # user who created the data.
        event.subscribe("SUMMARY-%s" % user_id, channel_id)

        self.response.out.write(json.dumps({
                "token": token
            }))