| Conditions | 1 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import {chat_v1 as chatV1} from 'googleapis/build/src/apis/chat/v1'; |
||
| 26 | |||
| 27 | protected createButton( |
||
| 28 | text: string, action: string, interaction: string | undefined = undefined, |
||
| 29 | parameters = []): chatV1.Schema$GoogleAppsCardV1Button { |
||
| 30 | const button: chatV1.Schema$GoogleAppsCardV1Button = { |
||
| 31 | text, |
||
| 32 | 'onClick': { |
||
| 33 | 'action': { |
||
| 34 | 'function': action, |
||
| 35 | }, |
||
| 36 | }, |
||
| 37 | }; |
||
| 38 | interaction && (button.onClick!.action!.interaction = interaction); |
||
| 39 | parameters.length && (button.onClick!.action!.parameters = parameters); |
||
| 40 | return button; |
||
| 41 | } |
||
| 63 |