Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Inkbunny Public API access C library.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
This is libibapi, the Inkbunny Public API access library, written in C. The motivation behind this library was to enable comfortable development of programs that work with the Inkbunny Public API, without needing to manually compose HTTP queries or to manually parse the response in JSON or XML format. With this library, the programmer gets to use regular C functions and regular C structures to communicate with Inkbunny's server. The main dependency of this library is glib, which provides convenient error handling using the GError structure, portability wrappers, convenient implementations of structures like linked lists, and other useful features. json-glib is also a dependency, it is used for response parsing. And since we access inkbunny via the internet, a networking library is also required. Currently, libcurl and libsoup are both supported, and it is relatively straight-forward to add support for new networking libraries in case there is interest in using them as the networking backend of this library. This library attempts to be a 1:1 mapping of the Inkbunny Public API into glib-enabled C. Therefore, it should be sufficient to look at the public header files in src/ibapi/ in conjunction with the official article describing the API (https://wiki.inkbunny.net/wiki/API) to write programs with it. In the structures returned by the library, there should never be a string field that is NULL. Empty strings, which include fields that were not present in Inkbunny's response, are represented by an empty string, that is, a pointer to a single '\0' byte. If you find otherwise with a field, it is a bug. There is also a set of example programs written for this library to show how the library might be used: https://github.com/dusxmt/ibapi_examples Installing/Compiling: For generic installation instructions, see the INSTALL file. In case you've gotten this library from a git repo, in order to generate the missing build system files, run: autoreconf -vfi Dependencies: Required for compiling: pkg-config >= 0.9.0 glib >= 2.32.4 json-glib >= 0.14.2 At least one of the following libraries is required to be present: libsoup >= 2.38.1 libcurl >= 7.26.0 Required for bootstrapping from git: autoconf >= 2.69 automake >= 1.11.6 libtool >= 2.4.2 Required for "make dist" from a git tree: perl