All Downloads are FREE. Search and download functionalities are using the official Maven repository.

C-libcurl.apiClient.h.mustache Maven / Gradle / Ivy

#ifndef INCLUDE_API_CLIENT_H
#define INCLUDE_API_CLIENT_H

#include 
#include 
#include 
#include 
#include 
#include "../include/list.h"
#include "../include/keyValuePair.h"

typedef struct apiClient_t {
    char *basePath;
    char *caPath;
    void *dataReceived;
    long response_code;
    {{#hasAuthMethods}}
    {{#authMethods}}
    {{#isBasic}}
    char *username;
    char *password;
    {{/isBasic}}
    {{#isOAuth}}
    char *accessToken;
    {{/isOAuth}}
    {{#isApiKey}}
    list_t *apiKeys;
    {{/isApiKey}}
    {{/authMethods}}
    {{/hasAuthMethods}}
} apiClient_t;

typedef struct binary_t
{
    uint8_t* data;
    unsigned int len;
} binary_t;

apiClient_t* apiClient_create();

apiClient_t* apiClient_create_with_base_path(const char *basePath
, const char *caPath
{{#hasAuthMethods}}
{{#authMethods}}
{{#isApiKey}}
, list_t *apiKeys
{{/isApiKey}}
{{/authMethods}}
{{/hasAuthMethods}}
);

void apiClient_free(apiClient_t *apiClient);

void apiClient_invoke(apiClient_t *apiClient,char* operationParameter, list_t *queryParameters, list_t *headerParameters, list_t *formParameters,list_t *headerType,list_t *contentType, char *bodyParameters, char *requestType);

char *strReplace(char *orig, char *rep, char *with);

char *base64encode(const void *b64_encode_this, int encode_this_many_bytes);

char *base64decode(const void *b64_decode_this, int decode_this_many_bytes);

#endif // INCLUDE_API_CLIENT_H




© 2015 - 2024 Weber Informatics LLC | Privacy Policy