Skip to content

2.4.0

Compare
Choose a tag to compare
@david-lev david-lev released this 14 Dec 20:28
· 34 commits to master since this release

What's Changed

Update with pip: pip3 install -U pywa

  • [sent_message] adding SentTemplate with SentTemplateStatus
  • [flows] adding pattern for TextInput
  • [flows] adding support for NavigationList
  • [flows] defaulting action's payload to empty dict
  • [flows] deprecating ActionNext and ActionNextType
from pywa import WhatsApp

wa = WhatsApp(...)
sent_template_status = wa.send_template(...).status
from pywa.types.flows import *

FlowJSON(
    version="6.2",
    screens=[
        Screen(
            id="MENU",
            title="Main Menu",
            layout=Layout(
                children=[
                    NavigationList(
                        name="menu",
                        list_items=[
                            NavigationItem(
                                id="1",
                                main_content=NavigationItemMainContent(
                                    title="Contact Us",
                                    description="Contact us now",
                                ),
                                on_click_action=NavigateAction(next=Next(name="CONTACT")),
                            ),
                            NavigationItem(
                                id="2",
                                main_content=NavigationItemMainContent(
                                    title="About Us",
                                    description="Learn more about us",
                                ),
                                on_click_action=NavigateAction(next=Next(name="ABOUT")),
                            ),
                        ],
                    ),
                ],
            ),
        ),
        Screen(id="CONTACT", ...),
        Screen(id="ABOUT", ...),
    ],
)

Full Changelog: 2.3.0...2.4.0