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

39 lines
853 B
C
Raw Normal View History

#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);
2018-03-29 18:30:30 +00:00
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);
2018-03-29 19:20:25 +00:00
void appendToPage(const std::string &pageName, const std::string &content);
private:
class impl;
std::unique_ptr<impl> pimpl;
};