I am working on a translation application And got stuck on implementing Google translation method. I've got Microsoft, RapidAPI and Yandex running with tsNetGetSync . Now I am trying to get Google translate to work with tsNetPostSync according with help of the google API example. The example is shown below but I cannot get it to work. Of coarse I have looked at LC examples like http://lessons.livecode.com/m/4071/l/69 ... -callbacks
Google API example
Code: Select all
POST https://translation.googleapis.com/language/translate/v2?key={YOUR_API_KEY}
{
"source": "en",
"target": "nl",
"q": [
"This is my text"
]
}
Code: Select all
tsNetPostSync(pURL, xHeaders, pPostData, rOutHeaders, rResult, rBytes, [pSettings])
Code: Select all
https://translation.googleapis.com/language/translate/v2?key={YOUR_API_KEY}
Can anybody help me on this?
Regards,
Paul (mrcoollion)
Addendum:
I have got it working with a get command and putting the parameter into the request URL...