Bookkeeping C++ API client
Bookkeeping C++ API client that can be used to access the rest API of O2's bookkeeping system.
|
Install dependencies and build the C++ client. In the root directory of the client:
Install and build cpprestdk:
Cmake and make the C++ client. In the root directory of the client:
Alternatively, you can speed up the build by adding the amount of cores it may run on:
This library serves as an C++ API client to the O2 bookkeeping system. API endpoints are documented in docblocks in BookkeepingInterface.h, or in the documentation directory -> index.html -> Bookkeeping -> BookkeepingApi. There's also an example of the usage in Example.cpp
API token is loaded into the Bookkeeping request upon page load, and can be extracted by looking with the chrome inspector -> network -> reload page and fetch token from request.
If your api is at http://localhost:4000/api
:
Note: don't include the "Bearer " part of the token, it's added automatically.
Generate the API client based on the OpenApi file. For generating the sourcecode we use an openapi-generator.
To use the stripped down version of the generator exectue the following command in the root directory of the api client:
For Windows users, you will need to install wget or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
Once the jar is downloaded, generate the api client with the following command. Please check that the paths are valid before doing so.