This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
libdokuwiki/include/dokuwiki.h
2018-03-29 20:30:30 +02:00

37 lines
774 B
C++

#pragma once
#include <string>
#include <memory>
class DokuWiki
{
public:
using error = std::runtime_error;
struct PageInfo
{
std::string name;
std::string author;
std::string timestamp;
};
public:
DokuWiki(const std::string &url, const std::string &username, const std::string &password);
~DokuWiki();
std::string getVersion();
std::string getTime();
std::string getPage(const std::string &pageName);
std::string getWikiTitle();
PageInfo getPageInfo(const std::string &pageName);
bool pageExists(const std::string &pageName);
void putPage(const std::string &pageName, const std::string &content);
void addPage(const std::string &pageName, const std::string &content);
private:
class impl;
std::unique_ptr<impl> pimpl;
};