Files
seadisk/src/main.cpp
T
2026-06-18 00:20:39 +08:00

15 lines
556 B
C++

#include "seafile/seafile_api.hpp"
#include <iostream>
int main(int argc,char** argv) {
seafile::SeaFileApi api("https://pan.hanwangsoft.com/");
if (const auto token = api.authToken("asypost@yeah.net","Shell0805@china"); token.has_value()) {
std::cout<<token.value<seafile::AuthToken>().token<<std::endl;
}else {
std::cout<<token.error().what()<<std::endl;
}
if (const auto server = api.serverInfo(); server.has_value()) {
std::cout<<server.value<seafile::ServerInfo>().version<<std::endl;
}
return 0;
}