William Cheng 7f1e79f7d2
[C] Optimize memory usage when printing JSON (#18072)
* cJSON generate unformatted json to save memory during large objects handling

* update sample

* add option to use cjson print unforamtted in client

* remove unused test template files

* add new samples

* update workflow

* update doc

* fix model filename

* fix inclulde

---------

Co-authored-by: Hemant Zope <42613258+zhemant@users.noreply.github.com>
Co-authored-by: Hemant Zope <hemantzope2008@gmail.com>
2024-03-11 16:18:08 +08:00

73 lines
1.4 KiB
C

#include <stdlib.h>
#include <stdio.h>
#include "../include/apiClient.h"
#include "../include/list.h"
#include "../external/cJSON.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
#include "../model/user.h"
// Create user
//
// This can only be done by the logged in user.
//
void
UserAPI_createUser(apiClient_t *apiClient, user_t *body);
// Creates list of users with given input array
//
void
UserAPI_createUsersWithArrayInput(apiClient_t *apiClient, list_t *body);
// Creates list of users with given input array
//
void
UserAPI_createUsersWithListInput(apiClient_t *apiClient, list_t *body);
// Delete user
//
// This can only be done by the logged in user.
//
void
UserAPI_deleteUser(apiClient_t *apiClient, char *username);
// Get user by user name
//
user_t*
UserAPI_getUserByName(apiClient_t *apiClient, char *username);
// Logs user into the system
//
char*
UserAPI_loginUser(apiClient_t *apiClient, char *username, char *password);
// Logs out current logged in user session
//
void
UserAPI_logoutUser(apiClient_t *apiClient);
// test integer and boolean query parameters in API
//
// This can test integer and boolean query parameters in API.
//
void
UserAPI_testIntAndBool(apiClient_t *apiClient, int *keep, int *keepDay);
// Updated user
//
// This can only be done by the logged in user.
//
void
UserAPI_updateUser(apiClient_t *apiClient, char *username, user_t *body);