예제 #1
0
class ViberMessageRequest(ViberReqestObject):
    message: TypedMessage = attr.ib(convert=ensure_factory(parse_message))
    sender: UserProfile = attr.ib(convert=ensure_cls(UserProfile))
    file_name: str
    chat_id: str = attr.ib(default=None)
    reply_type: str = attr.ib(default=None)
    silent: str = attr.ib(default=None)
class ViberConversationStartedRequest(ViberReqestObject):
    message_token: int = attr.ib()
    type: str = attr.ib()
    user: UserProfile = attr.ib(converter=ensure_cls(UserProfile))
    subscribed: str = attr.ib()
    context: str = attr.ib(default=None)
    api_version: str = attr.ib(default=None)
예제 #3
0
class LocationMessage(TypedMessage):
    type: str = attr.ib(default='location')
    location: Location = attr.ib(default=None, convert=ensure_cls(Location))
예제 #4
0
class ContactMessage(TypedMessage):
    type: str = attr.ib(default='contact')
    text: str = attr.ib(default=None)
    contact: Contact = attr.ib(default=None, convert=ensure_cls(Contact))
예제 #5
0
class ViberSubscribedRequest(ViberReqestObject):
    user: UserProfile = attr.ib(converter=ensure_cls(UserProfile))
    api_version: str = attr.ib()