コード例 #1
0
ファイル: service.py プロジェクト: kirkboyer-wf/github-stats
    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
ファイル: service.py プロジェクト: Workiva/gae-financials
    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
ファイル: service.py プロジェクト: kirkboyer-wf/github-stats
    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
ファイル: service.py プロジェクト: Workiva/gae-financials
    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
            }))