formatting

This commit is contained in:
Maxim Slipenko 2023-11-28 22:13:58 +03:00
parent 9695fe405d
commit 9aafd0f238
5 changed files with 11 additions and 11 deletions

View File

@ -93,4 +93,4 @@ int api_http_request(
curl_global_cleanup();
return 0;
}
}

View File

@ -5,7 +5,8 @@
#include "yadisk_get_disk.h"
#include "yadisk_api_internal.h"
yadisk_code yadisk_get_disk(yadisk_api_client *client, yadisk_disk_info* info) {
yadisk_code yadisk_get_disk(yadisk_api_client* client, yadisk_disk_info* info)
{
char* output = NULL;
int error = api_http_request(client, "GET", "/v1/disk", NULL, 0, &output);
json_object* root = json_tokener_parse(output);
@ -25,4 +26,4 @@ yadisk_code yadisk_get_disk(yadisk_api_client *client, yadisk_disk_info* info) {
json_object_put(root);
free(output);
return YADISK_OK;
}
}

View File

@ -7,11 +7,10 @@
#include "yadisk_shared.h"
typedef struct yadisk_disk_info
{
typedef struct yadisk_disk_info {
unsigned long total_space;
} yadisk_disk_info;
yadisk_code yadisk_get_disk(yadisk_api_client *client, yadisk_disk_info* info);
yadisk_code yadisk_get_disk(yadisk_api_client* client, yadisk_disk_info* info);
#endif //YADISK_YADISK_GET_DISK_H

View File

@ -5,7 +5,8 @@
#include "yadisk_api_internal.h"
yadisk_code
yadisk_get_disk_resources(yadisk_api_client *client, const char *path) {
char *output;
yadisk_get_disk_resources(yadisk_api_client* client, const char* path)
{
char* output;
int error = api_http_request(client, "GET", "/v1/disk", NULL, 0, &output);
};
};

View File

@ -14,8 +14,7 @@ typedef enum {
YADISK_FAILED_PARSE_JSON = 1
} yadisk_code;
typedef struct
{
typedef struct {
char* token;
} yadisk_api_client;