# Example with a tibble:
tibble::tribble(
~title, ~type, ~url, ~phone_number,
"Website", "url", "https://example.com", NA,
"Call Support","call", NA, "5581999999999"
) |>
whapi_coerce_buttons_base() |>
whapi_coerce_buttons_mixed()
# Example with a list:
whapi_coerce_buttons_mixed(list(
list(type="url", title="Website", url="https://example.com"),
list(type="call", title="Call us", phone_number="5581999999999"),
list(type="copy", title="Copy OTP", copy_code="123456")
))
Run the code above in your browser using DataLab