libsurl team mailing list archive
-
libsurl team
-
Mailing list archive
-
Message #00019
Python function?
Looking at libsurl's source code, I've found that it seems almost
impossible for Python's -- or in this case, surl -- CDLL to call it.
What can be done in the future is to implement a simple function that
takes all arguments (url, api key, etc and null for none) and returns
the shortened API.
Here's an example:
char *surl_pyget(char *url, char *service, char *key, /more args/)
{
/// do surl_getopt()'s, null or empty string=ignore/
char *shortUrl = /shortened url/;
// /cleanup/
return shortUrl;
}
Regards,
Ahmed Elmahdawy
Follow ups