HubSpot / slack-client

An asynchronous HTTP client for Slack's web API
Apache License 2.0
114 stars 53 forks source link

Add getStringValue method to BlockKit inputs #267

Closed zmarushchak-hs closed 2 years ago

zmarushchak-hs commented 2 years ago

Currently, each input type has its own type for the included value it is needed to handle each input separately. It is not convenient when handling a collection of inputs (consider situation when different BlockKit inputs are submitted for the same view). This PR adds a getter to the ViewInput interface to make values extraction more universal (return a String value). I decided that converting to String DatePicker and multiple checkboxes inputs makes no sense and I think it is OK to handle them as a special case.