Skip to content

Commit

Permalink
Merge pull request #24 from cloverstd/master
Browse files Browse the repository at this point in the history
Add `EnterAgentEvent` for WeChat enterprise. Credit goes to @cloverstd
  • Loading branch information
messense committed Jan 16, 2015
2 parents 2095951 + 9351775 commit e24b77c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions wechatpy/enterprise/events.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import absolute_import, unicode_literals
from ..fields import IntegerField
from .. import events
Expand Down Expand Up @@ -66,3 +68,14 @@ class PicWeChatEvent(events.PicWeChatEvent):
@register_event('location_select')
class LocationSelectEvent(events.LocationSelectEvent):
agent = IntegerField('AgentID', 0)


@register_event('enter_agent')
class EnterAgentEvent(events.BaseEvent):
"""
用户进入应用的事件推送
详情请参阅
http://qydev.weixin.qq.com/wiki/index.php?title=%E6%8E%A5%E6%94%B6%E4%BA%8B%E4%BB%B6#.E7.94.A8.E6.88.B7.E8.BF.9B.E5.85.A5.E5.BA.94.E7.94.A8.E7.9A.84.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81
"""
agent = IntegerField('AgentID', 0)
event = 'enter_agent'

0 comments on commit e24b77c

Please sign in to comment.