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

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

There is a newer version: 3.3.4.2
Show newest version
#ifndef INCLUDE_API_CLIENT_H
#define INCLUDE_API_CLIENT_H

#include "list.h"

typedef int bool;
#define true 1
#define false 0

typedef struct apiClient_t {
    char *basePath;
    void *dataReceived;
    long response_code;
    // this would only be generated for basic authentication
    #ifdef BASIC_AUTH
    char *username;
    char *password;
    #endif // BASIC_AUTH
    // this would only be generated for OAUTH2 authentication
    #ifdef OAUTH2
    char *accessToken;
    #endif // OAUTH2
    #ifdef API_KEY
    //this would only be generated for apiKey authentication
    list_t *apiKeys;
    #endif // API_KEY
} apiClient_t;

typedef struct FileStruct
{
    char* fileData;
    long fileSize;
}FileStruct;

apiClient_t* apiClient_create();

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);

#endif // INCLUDE_API_CLIENT_H




© 2015 - 2025 Weber Informatics LLC | Privacy Policy