clients/c/generated/api/BlueOceanAPI.c
char*
BlueOceanAPI_getClasses(apiClient_t *apiClient, char * _class )
{
    list_t    *localVarQueryParameters = NULL;
    list_t    *localVarHeaderParameters = NULL;
    list_t    *localVarFormParameters = NULL;
    list_t *localVarHeaderType = list_createList();
    list_t *localVarContentType = NULL;
    char      *localVarBodyParameters = NULL;

    // create the path
    long sizeOfPath = strlen("/blue/rest/classes/{class}")+1;
    char *localVarPath = malloc(sizeOfPath);
    snprintf(localVarPath, sizeOfPath, "/blue/rest/classes/{class}");


    // Path Params
    long sizeOfPathParams__class = strlen(_class)+3 + strlen("{ class }");
    if(_class == NULL) {
        goto end;
    }
    char* localVarToReplace__class = malloc(sizeOfPathParams__class);
    sprintf(localVarToReplace__class, "{%s}", "class");

    localVarPath = strReplace(localVarPath, localVarToReplace__class, _class);


    list_addElement(localVarHeaderType,"application/json"); //produces
    apiClient_invoke(apiClient,
                    localVarPath,
                    localVarQueryParameters,
                    localVarHeaderParameters,
                    localVarFormParameters,
                    localVarHeaderType,
                    localVarContentType,
                    localVarBodyParameters,
                    "GET");

    if (apiClient->response_code == 200) {
        printf("%s\n","Successfully retrieved class names");
    }
    if (apiClient->response_code == 401) {
        printf("%s\n","Authentication failed - incorrect username and/or password");
    }
    if (apiClient->response_code == 403) {
        printf("%s\n","Jenkins requires authentication - please set username and password");
    }
    //primitive return type simple
    char* elementToReturn =  strdup((char*)apiClient->dataReceived);

    if (apiClient->dataReceived) {
        free(apiClient->dataReceived);
        apiClient->dataReceived = NULL;
        apiClient->dataReceivedLen = 0;
    }
    
    
    
    list_freeList(localVarHeaderType);
    
    free(localVarPath);
    free(localVarToReplace__class);
    return elementToReturn;
end:
    free(localVarPath);
    return NULL;

}
// Get a list of class names supported by a given class
//
Get a list of class names supported by a given class
Get a list of class names supported by a given class
char*
BlueOceanAPI_getClasses(apiClient_t *apiClient, char * _class )
{
    list_t    *localVarQueryParameters = NULL;
    list_t    *localVarHeaderParameters = NULL;
    list_t    *localVarFormParameters = NULL;
    list_t *localVarHeaderType = list_createList();
    list_t *localVarContentType = NULL;
    char      *localVarBodyParameters = NULL;
    long sizeOfPath = strlen("/blue/rest/classes/{class}")+1;
    char *localVarPath = malloc(sizeOfPath);
    snprintf(localVarPath, sizeOfPath, "/blue/rest/classes/{class}");
    long sizeOfPathParams__class = strlen(_class)+3 + strlen("{ class }");
    if(_class == NULL) {
        goto end;
    }
    char* localVarToReplace__class = malloc(sizeOfPathParams__class);
    sprintf(localVarToReplace__class, "{%s}", "class");
    localVarPath = strReplace(localVarPath, localVarToReplace__class, _class);
    list_addElement(localVarHeaderType,"application/json"); 
    apiClient_invoke(apiClient,
                    localVarPath,
                    localVarQueryParameters,
                    localVarHeaderParameters,
                    localVarFormParameters,
                    localVarHeaderType,
                    localVarContentType,
                    localVarBodyParameters,
                    "GET");
    if (apiClient->response_code == 200) {
        printf("%s\n","Successfully retrieved class names");
    }
    if (apiClient->response_code == 401) {
        printf("%s\n","Authentication failed - incorrect username and/or password");
    }
    if (apiClient->response_code == 403) {
        printf("%s\n","Jenkins requires authentication - please set username and password");
    }
    char* elementToReturn =  strdup((char*)apiClient->dataReceived);
    if (apiClient->dataReceived) {
        free(apiClient->dataReceived);
        apiClient->dataReceived = NULL;
        apiClient->dataReceivedLen = 0;
    }
    list_freeList(localVarHeaderType);
    free(localVarPath);
    free(localVarToReplace__class);
    return elementToReturn;
end:
    free(localVarPath);
    return NULL;
}
char * BlueOceanAPI_getClasses ( apiClient_t * apiClient , char * _class ) { list_t * localVarQueryParameters = NULL ; list_t * localVarHeaderParameters = NULL ; list_t * localVarFormParameters = NULL ; list_t * localVarHeaderType = list_createList ( ) ; list_t * localVarContentType = NULL ; char * localVarBodyParameters = NULL ; long sizeOfPath = strlen ( " " ) + 1 ; char * localVarPath = malloc ( sizeOfPath ) ; snprintf ( localVarPath , sizeOfPath , " " ) ; long sizeOfPathParams__class = strlen ( _class ) + 3 + strlen ( " " ) ; if ( _class == NULL ) { goto end ; } char * localVarToReplace__class = malloc ( sizeOfPathParams__class ) ; sprintf ( localVarToReplace__class , " " , " " ) ; localVarPath = strReplace ( localVarPath , localVarToReplace__class , _class ) ; list_addElement ( localVarHeaderType , " " ) ; apiClient_invoke ( apiClient , localVarPath , localVarQueryParameters , localVarHeaderParameters , localVarFormParameters , localVarHeaderType , localVarContentType , localVarBodyParameters , " " ) ; if ( apiClient -> response_code == 200 ) { printf ( " \n " , " " ) ; } if ( apiClient -> response_code == 401 ) { printf ( " \n " , " " ) ; } if ( apiClient -> response_code == 403 ) { printf ( " \n " , " " ) ; } char * elementToReturn = strdup ( ( char * ) apiClient -> dataReceived ) ; if ( apiClient -> dataReceived ) { free ( apiClient -> dataReceived ) ; apiClient -> dataReceived = NULL ; apiClient -> dataReceivedLen = 0 ; } list_freeList ( localVarHeaderType ) ; free ( localVarPath ) ; free ( localVarToReplace__class ) ; return elementToReturn ; end : free ( localVarPath ) ; return NULL ; }
Get a list of class names supported by a given class
Get a list of class names supported by a given class
// create the path // Path Params //produces //primitive return type simple