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(). */
| 322 | * in order to do higher level work. 'resptr' works the same as in |
| 323 | * makeHTTPGETCall(). */ |
| 324 | sds 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. */ |
no test coverage detected