initial commit
This commit is contained in:
commit
d306f261bd
8 files changed
+302
No files matched your search
@@ -0,0 +1,15 @@
|
||||
#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;
|
||||
}
|
||||
Reference in new issue
Block a user