Private Sub txtMessage_Append_Click (event As BANanoEvent)
If txtMessage.IsBlank Then Return
txtConvert.Value = ""
txtMessage.AppendButton.Loading = True
'execute the fetch
Dim j As SDUIFetch
j.Initialize("https://api.funtranslations.com/translate/minion.json")
j.AddParameter("text", txtMessage.value)
j.SetContentTypeApplication_X_WWW_Form_URLEncoded
'compulsory
j.AddHeader("X-Funtranslations-Api-Secret", "")
'execute the post
banano.Await(J.PostWait)
txtMessage.AppendButton.Loading = False
If j.Success Then
Dim response As Map = j.response
If response.ContainsKey("contents") Then
Dim minionTaal As String = SDUIShared.GetRecursive(response, "contents.translated")
txtConvert.Value = minionTaal
End If
Else
txtConvert.Value = j.ErrorMessage
End If
End Sub