libyadisk/tests/app.c

25 lines
452 B
C
Raw Normal View History

2023-11-27 09:03:47 +03:00
//
// Created by maxim on 27.11.23.
//
#include <yadisk.h>
2023-11-27 09:03:47 +03:00
#include <stdio.h>
int main() {
char token[1024];
printf("Enter OAuth token: ");
fgets(token, sizeof(token), stdin);
yadisk_api_client* client = &(yadisk_api_client){
.token = token
};
yadisk_disk_info yadisk_disk_info;
yadisk_get_disk(client, &yadisk_disk_info);
printf("Total disk size: %lu", yadisk_disk_info.total_space);
return 0;
}