libcatboy is a easy to use, wrapper library for the catboys.com API for c++!
The library uses curlpp and nlohmann json for the API requests.
git clone --recursive https://github.com/omoNattie/libcatboy
# CMakeLists.txt
add_subdirectory(your_third_party_dir/libcatboy)
add_executable(
...
)
target_link_libraries(${PROJECT_NAME}
# your other libraries
libcatboy
)
#include <catboys.hpp>
int main(int argc, char **argv) {
catboys::image img = catboys::get_image();
printf("%s\n%s", img.url, img.artist);
return 0;
}
See also: