eZmax API Definition (Full)
- API version: 1.3.1
- Generator version: 7.23.0
This API expose all the functionnalities for the eZmax and eZsign applications.
For more information, please visit https://www.ezmax.ca/en/contact
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- CMake 3.2+
- Qt
- C++ Compiler
example.h:
#include <iostream>
#include "../client/DocumentationEzmaxpartnerApi.h"
using namespace test_namespace;
class Example : public QObject {
Q_OBJECT
Documentation_subscribe_v1_Request create();
public Q_SLOTS:
void exampleFunction1();
};
example.cpp:
#include "../client/DocumentationEzmaxpartnerApi.h"
#include "example.h"
#include <QTimer>
#include <QEventLoop>
Documentation_subscribe_v1_Request Example::create(){
Documentation_subscribe_v1_Request obj;
return obj;
}
void Example::exampleFunction1(){
DocumentationEzmaxpartnerApi apiInstance;
// Configure API key authorization: Authorization
apiInstance.setApiKey("YOUR API KEY NAME","YOUR API KEY");
QEventLoop loop;
connect(&apiInstance, &DocumentationEzmaxpartnerApi::documentationSubscribeV1Signal, [&]() {
loop.quit();
});
connect(&apiInstance, &DocumentationEzmaxpartnerApi::documentationSubscribeV1SignalE, [&](QNetworkReply::NetworkError, const QString &error_str) {
qDebug() << "Error happened while issuing request : " << error_str;
loop.quit();
});
Documentation_subscribe_v1_Request documentation_subscribe_v1_request = create(); // Documentation_subscribe_v1_Request |
apiInstance.documentationSubscribeV1(documentation_subscribe_v1_request);
QTimer::singleShot(5000, &loop, &QEventLoop::quit);
loop.exec();
}
Parameterized Servers are supported. Define a server in the API for each endpoint with arbitrary numbers of variables:
servers:
- url: http://{server}:{port}/{basePath}
description: Description of the Server
variables:
server:
enum:
- 'petstore'
- 'qa-petstore'
- 'dev-petstore'
default: 'petstore'
port:
enum:
- '3000'
- '1000'
default: '3000'
basePath:
default: v1To change the default variable, use this function in each Api:
int setDefaultServerValue(int serverIndex,const QString &operation, const QString &variable,const QString &val);The parameter "serverIndex" will choose a server from the server list for each endpoint. There is always at least one server with index 0. The Parameter "operation" should be the desired endpoint operationid. Variable is the name of the variable you wish to change and the value is the new default Value. The function will return -1 when the variable does not exists, -2 if value is not defined in the variable enum and -3 if the operation is not found.
If your endpoint has multiple server objects in the servers array, you can set the server that will be used with this function:
void setServerIndex(const QString &operation, int serverIndex);Parameter "operation" should be your operationid. "serverIndex" is the index you want to set as your default server. The function will check if there is a server with your index.
Alternatively, to set the server index globally for all operations:
void setServerIndex(int serverIndex);This will apply the specified server index to all operations in the API.
Here is an example of multiple servers in the servers array. The first server will have index 0 and the second will have index 1.
servers:
- url: http://{server}:8080/
description: Description of the Server
variables:
server:
enum:
- 'petstore'
- 'qa-petstore'
- 'dev-petstore'
default: 'petstore'
- url: https://localhost:8080/v1Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
- Type: HTTP Bearer Token authentication
- Type: API key
- API key parameter name: sAuthorization
- Location: URL query string
MIT License for more information visit MIT License