qlic

Zoho Cliq but not really
git clone git@getsh.org:qlic.git
Log | Files | Refs | LICENSE

cliq_apis.c (599B)


      1 #include <cliq_apis.h>
      2 #include <qlic_common.h>
      3 #include <stdio.h>
      4 #include <stdlib.h>
      5 
      6 QlicString* qlic_send_message_str(QlicString* chat_id) {
      7 #define __QLIC_SEND_MESSAGE_API_STR "https://cliq.zoho.com/api/v2/chats/%s/message"
      8 	QlicString* send_message = init_qlic_string();
      9 	// minus 2 for removing the format specifier :(
     10 	send_message->len = sizeof(__QLIC_SEND_MESSAGE_API_STR) + chat_id->len - 2;
     11 	send_message->string = (char *)malloc(send_message->len * sizeof(char));
     12 	snprintf(send_message->string, send_message->len, __QLIC_SEND_MESSAGE_API_STR, chat_id->string);
     13 	return send_message;
     14 }