qRestAPI is a cross-platform Qt-based library allowing to easily query any RESTful web services.
It provides the following interfaces:
| Interface | RESTful API |
|---|---|
qRestAPI |
any |
qGirderAPI |
Girder |
qMidasAPI |
Midas |
git clone git://github.com/commontk/qRestAPI.git
mkdir qRestAPI-build
cd qRestAPI-build
cmake -DQt5_DIR:PATH=/path/to/QtX.Y.Z/X.Y.Z/gcc_64/lib/cmake/Qt5 ../qRestAPI
make -j4
git clone git://github.com/commontk/qRestAPI.git
mkdir qRestAPI-build
cd qRestAPI-build
cmake -DQT6_INSTALL_PREFIX:PATH=/path/to/QtX.Y.Z/X.Y.Z/gcc_64 ../qRestAPI
make -j4
By default only the runtime library is installed. To also install the
development files (headers, exported CMake targets and the package config
file) — e.g. when building a package or a standalone install tree — turn on
qRestAPI_INSTALL_DEVELOPMENT:
cmake -DqRestAPI_INSTALL_DEVELOPMENT=ON -DCMAKE_INSTALL_PREFIX=/path/to/prefix ../qRestAPI
make install
The install tree is relocatable. Downstream projects consume it with:
find_package(qRestAPI REQUIRED)
target_link_libraries(MyTarget PRIVATE qRestAPI)
The following variables let a parent project (typically a superbuild) override the install layout; each defaults to a standalone-friendly value when unset:
| Variable | Default |
|---|---|
qRestAPI_INSTALL_DEVELOPMENT |
OFF |
qRestAPI_INSTALL_BIN_DIR |
bin |
qRestAPI_INSTALL_LIB_DIR |
lib/qRestAPI |
qRestAPI_INSTALL_INCLUDE_DIR |
include/qRestAPI |
qRestAPI_INSTALL_CMAKE_DIR |
cmake/qRestAPI |
To run tests checking that queries can successfully be executed.
cd qRestAPI-build
ctest
List of tests expecting servers to be reachable:
| Test | Server |
|---|---|
qGirderAPITest |
https://data.kitware.com/api/v1 |
qMidasAPITest |
https://slicer.kitware.com/midas3 |
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
See CONTRIBUTING.md for more details.