mastorss/src/mastoapi.hpp

47 lines
1.2 KiB
C++
Raw Normal View History

2019-12-28 07:13:30 +01:00
/* This file is part of mastorss.
2020-05-10 17:01:20 +02:00
* Copyright © 2019, 2020 tastytea <tastytea@tastytea.de>
2019-12-28 07:13:30 +01:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MASTORSS_MASTOAPI_HPP
#define MASTORSS_MASTOAPI_HPP
#include "config.hpp"
#include "document.hpp"
#include <mastodonpp/mastodonpp.hpp>
2019-12-28 07:13:30 +01:00
2020-05-10 17:01:20 +02:00
#include <string>
2019-12-28 07:13:30 +01:00
namespace mastorss
{
2020-05-10 17:01:20 +02:00
using std::string;
2019-12-28 07:13:30 +01:00
class MastoAPI
{
public:
2020-01-01 12:43:42 +01:00
explicit MastoAPI(ProfileData &data);
2019-12-28 07:13:30 +01:00
void post_item(const Item &item, bool dry_run);
2019-12-28 07:13:30 +01:00
private:
2020-01-01 12:43:42 +01:00
ProfileData &_profile;
mastodonpp::Instance _instance;
2020-05-10 17:01:20 +02:00
string replacements_apply(const string &text);
2019-12-28 07:13:30 +01:00
};
} // namespace mastorss
2020-11-05 14:14:16 +01:00
#endif // MASTORSS_MASTOAPI_HPP