2019-12-28 07:13:30 +01:00
|
|
|
/* This file is part of mastorss.
|
|
|
|
* Copyright © 2019 tastytea <tastytea@tastytea.de>
|
|
|
|
*
|
|
|
|
* 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"
|
|
|
|
|
2020-01-15 19:05:49 +01:00
|
|
|
#include <mastodonpp/mastodonpp.hpp>
|
2019-12-28 07:13:30 +01:00
|
|
|
|
|
|
|
namespace mastorss
|
|
|
|
{
|
|
|
|
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);
|
|
|
|
|
|
|
|
private:
|
2020-01-01 12:43:42 +01:00
|
|
|
ProfileData &_profile;
|
2020-01-15 19:05:49 +01:00
|
|
|
mastodonpp::Instance _instance;
|
2020-01-01 12:43:42 +01:00
|
|
|
constexpr static size_t _max_guids{100};
|
2019-12-28 07:13:30 +01:00
|
|
|
};
|
|
|
|
} // namespace mastorss
|
|
|
|
|
|
|
|
#endif // MASTORSS_MASTOAPI_HPP
|