MCPcopy Index your code
hub / github.com/antirez/botlib / makeGETBotRequest

Function makeGETBotRequest

botlib.c:324–333  ·  view source on GitHub ↗

Make an HTTP request to the Telegram bot API, where 'req' is the specified * action name. This is a low level API that is used by other bot APIs * in order to do higher level work. 'resptr' works the same as in * makeHTTPGETCall(). */

Source from the content-addressed store, hash-verified

322 * in order to do higher level work. 'resptr' works the same as in
323 * makeHTTPGETCall(). */
324sds makeGETBotRequest(const char *action, int *resptr, char **optlist, int numopt)
325{
326 sds url = sdsnew("https://api.telegram.org/bot");
327 url = sdscat(url,Bot.apikey);
328 url = sdscatlen(url,"/",1);
329 url = sdscat(url,action);
330 sds body = makeHTTPGETCallOpt(url,resptr,optlist,numopt);
331 sdsfree(url);
332 return body;
333}
334
335/* Send an image using the sendPhoto endpoint. Return 1 on success, 0
336 * on error. */

Callers 5

botGetUsernameFunction · 0.85
botSendMessageAndGetInfoFunction · 0.85
botEditMessageTextFunction · 0.85
botGetFileFunction · 0.85
botProcessUpdatesFunction · 0.85

Calls 5

sdsnewFunction · 0.85
sdscatFunction · 0.85
sdscatlenFunction · 0.85
makeHTTPGETCallOptFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected