From bd9ea4b4bb2841874e74e2bc9d42b18540b10874 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 14 Apr 2019 06:49:40 +0200 Subject: [PATCH] 2019-04-14 --- docs/classMastodon_1_1Easy_1_1API.html | 4 +--- docs/easy_8hpp_source.html | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/classMastodon_1_1Easy_1_1API.html b/docs/classMastodon_1_1Easy_1_1API.html index 71ca2f1..29b5b0e 100644 --- a/docs/classMastodon_1_1Easy_1_1API.html +++ b/docs/classMastodon_1_1Easy_1_1API.html @@ -381,7 +381,6 @@ Additional Inherited Members

Gets notifications.

Parameters
- @@ -417,8 +416,7 @@ Additional Inherited Members

Sends a post.

Parameters
errorError code
limitMaximum number of notifications
since_idReturn notifications newer than ID
max_idReturn notifications older than ID
- - +
statusThe status to send
errorError code
statusThe status to send
diff --git a/docs/easy_8hpp_source.html b/docs/easy_8hpp_source.html index 0fa2de4..235fdc5 100644 --- a/docs/easy_8hpp_source.html +++ b/docs/easy_8hpp_source.html @@ -47,7 +47,7 @@ $(function() {
easy.hpp
-
1 /* This file is part of mastodon-cpp.
2  * Copyright © 2018, 2019 tastytea <tastytea@tastytea.de>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef MASTODON_EASY_CPP_HPP
18 #define MASTODON_EASY_CPP_HPP
19 
20 #include <string>
21 #include <cstdint>
22 #include <vector>
23 #include <functional>
24 #include <ostream>
25 #include <jsoncpp/json/json.h>
26 
27 // If we are compiling mastodon-cpp, use another include path
28 #ifdef MASTODON_CPP
29  #include "mastodon-cpp.hpp"
30  #include "easy/return_types_easy.hpp"
31  #include "easy/types_easy.hpp"
32  #include "easy/entities/notification.hpp"
33  #include "easy/entities/status.hpp"
34 #else
35  #include <mastodon-cpp/mastodon-cpp.hpp>
36  #include <mastodon-cpp/easy/return_types_easy.hpp>
37  #include <mastodon-cpp/easy/types_easy.hpp>
38  #include <mastodon-cpp/easy/entities/notification.hpp>
39  #include <mastodon-cpp/easy/entities/status.hpp>
40 #endif
41 
42 using std::string;
43 using std::vector;
44 using std::uint64_t;
45 using std::uint16_t;
46 
47 namespace Mastodon
48 {
53 namespace Easy
54 {
62  // TODO: Convert to struct?
63  class Link
64  {
65  public:
71  explicit Link(const string &link_header);
72 
78  const string next() const;
79 
85  const string max_id() const;
86 
92  const string prev() const;
93 
99  const string since_id() const;
100 
101  private:
102  string _next;
103  string _prev;
104  };
105 
115  const std::vector<string> json_array_to_vector(const string &json);
116 
126  const std::vector<stream_event> parse_stream(const std::string &streamdata);
127 
133  class API : public Mastodon::API
134  {
135  public:
147  explicit API(const string &instance, const string &access_token);
148 
154  const Link get_link() const;
155 
166  const return_entity<Easy::Status> send_post(const Status &status);
167 
173  const return_entity<Easy::Status> send_toot(const Status &status);
174 
188  const uint16_t limit = 20, const string since_id = "",
189  const string max_id = "");
190  };
191 }
192 }
193 
194 #endif // MASTODON_EASY_CPP_HPP
Interface to the Mastodon API.
Definition: mastodon-cpp.hpp:76
+
1 /* This file is part of mastodon-cpp.
2  * Copyright © 2018, 2019 tastytea <tastytea@tastytea.de>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef MASTODON_EASY_CPP_HPP
18 #define MASTODON_EASY_CPP_HPP
19 
20 #include <string>
21 #include <cstdint>
22 #include <vector>
23 #include <functional>
24 #include <ostream>
25 #include <jsoncpp/json/json.h>
26 
27 // If we are compiling mastodon-cpp, use another include path
28 #ifdef MASTODON_CPP
29  #include "mastodon-cpp.hpp"
30  #include "easy/return_types_easy.hpp"
31  #include "easy/types_easy.hpp"
32  #include "easy/entities/notification.hpp"
33  #include "easy/entities/status.hpp"
34 #else
35  #include <mastodon-cpp/mastodon-cpp.hpp>
36  #include <mastodon-cpp/easy/return_types_easy.hpp>
37  #include <mastodon-cpp/easy/types_easy.hpp>
38  #include <mastodon-cpp/easy/entities/notification.hpp>
39  #include <mastodon-cpp/easy/entities/status.hpp>
40 #endif
41 
42 using std::string;
43 using std::vector;
44 using std::uint64_t;
45 using std::uint16_t;
46 
47 namespace Mastodon
48 {
53 namespace Easy
54 {
62  // TODO: Convert to struct?
63  class Link
64  {
65  public:
71  explicit Link(const string &link_header);
72 
78  const string next() const;
79 
85  const string max_id() const;
86 
92  const string prev() const;
93 
99  const string since_id() const;
100 
101  private:
102  string _next;
103  string _prev;
104  };
105 
115  const std::vector<string> json_array_to_vector(const string &json);
116 
126  const std::vector<stream_event> parse_stream(const std::string &streamdata);
127 
133  class API : public Mastodon::API
134  {
135  public:
147  explicit API(const string &instance, const string &access_token);
148 
154  const Link get_link() const;
155 
165  const return_entity<Easy::Status> send_post(const Status &status);
166 
172  const return_entity<Easy::Status> send_toot(const Status &status);
173 
186  const uint16_t limit = 20, const string since_id = "",
187  const string max_id = "");
188  };
189 }
190 }
191 
192 #endif // MASTODON_EASY_CPP_HPP
Interface to the Mastodon API.
Definition: mastodon-cpp.hpp:76