Request to integrate WordAI API with Google Sheet

57 views
Skip to first unread message

Engineer Johirul Islam

unread,
Jun 1, 2020, 3:19:38 PM6/1/20
to google-apps-sc...@googlegroups.com
I am wondering if someone write the procedure how to integrate WordAI API with google sheet.


Here is the API code for your kind information or you may visit Wordai website for details

"
function api($text,$quality,$email,$pass)

{

   if(isset($text) && isset($quality) && isset($email) && isset($pass))

   {

      $text = urlencode($text);

      $ch = curl_init('http://wordai.com/users/turing-api.php');

      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

      curl_setopt ($ch, CURLOPT_POST, 1);

      curl_setopt ($ch, CURLOPT_POSTFIELDS, "s=$text&quality=$quality&email=$email&pass=$pass&output=json");

      $result = curl_exec($ch);

      curl_close ($ch);

      return $result;

   }

   else

   {

      return 'Error: Not All Variables Set!';

   }

}

//The variable quality can currently be 'Regular', 'Unique', 'Very Unique', 'Readable', or 'Very Readable'

echo api(stripslashes('Here is an example.'),'Regular','email','password');

"

Tanaike

unread,
Jun 2, 2020, 1:04:55 AM6/2/20
to Google Apps Script Community
I thought that you might have forgot to add the hyperlink for "Wordai website" of "you may visit Wordai website for details".

Engineer Johirul Islam

unread,
Jun 2, 2020, 8:52:28 AM6/2/20
to google-apps-sc...@googlegroups.com
Basically I don't try to add a hyperlink to my post. As you point out these things, you may visit https://wordai.com/api.php page for more details. Hope I will get a good solution from you gays very soon...

Reply all
Reply to author
Forward
0 new messages