updated documentation
This commit is contained in:
parent
013a67bbe0
commit
80df5cafff
4
Doxyfile
4
Doxyfile
@ -77,8 +77,8 @@ WARN_FORMAT = "$file:$line: $text"
|
||||
INPUT_ENCODING = UTF-8
|
||||
RECURSIVE = NO
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXAMPLE_PATH = examples
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
EXAMPLE_PATH = src/examples
|
||||
EXAMPLE_RECURSIVE = YES
|
||||
FILTER_SOURCE_FILES = NO
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = YES
|
||||
|
@ -41,7 +41,7 @@ Install with `make install`.
|
||||
|
||||
# Usage
|
||||
|
||||
The HTML reference can be generated with `build_doc.sh`, if doxygen is installed. Or just look in `src/mastodon-cpp.hpp`. There is an example in `src/examples/`.
|
||||
The HTML reference can be generated with `build_doc.sh`, if doxygen is installed. Or just look in `src/mastodon-cpp.hpp`. There are examples in `src/examples/`.
|
||||
|
||||
## Compiling your project
|
||||
|
||||
|
@ -60,6 +60,15 @@ int main(int argc, char *argv[])
|
||||
// if answer is "[]" there are none at all
|
||||
if (answer != "" && answer != "[]")
|
||||
{
|
||||
string ornament = " +++++";
|
||||
for (std::uint8_t i = hashtag.size(); i > 0; --i)
|
||||
{
|
||||
ornament += "+";
|
||||
}
|
||||
cout << ornament << '\n';
|
||||
cout << " + " << hashtag << ": +\n";
|
||||
cout << ornament << '\n';
|
||||
|
||||
std::istringstream iss(answer);
|
||||
pt::ptree tree;
|
||||
|
||||
@ -78,6 +87,10 @@ int main(int argc, char *argv[])
|
||||
<< " (" << toot.second.get<string>("account.acct") << ") at "
|
||||
<< toot.second.get<string>("created_at") << "\n";
|
||||
cout << " " << toot.second.get<string>("url") << '\n';
|
||||
for (const pt::ptree::value_type &media : toot.second.get_child("media_attachments"))
|
||||
{
|
||||
cout << "Attachment: <" << media.second.get<string>("url") << ">\n";
|
||||
}
|
||||
cout << "++++++++\n";
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,27 @@
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/asio/ssl.hpp>
|
||||
|
||||
/*!
|
||||
* @example example1_dump_json.cpp
|
||||
* @example example2_parse_account.cpp
|
||||
* @example example3_mastocron.cpp
|
||||
*/
|
||||
namespace Mastodon
|
||||
{
|
||||
/*!
|
||||
* @brief Class for the Mastodon API.
|
||||
* @section error Error codes
|
||||
* | Code | Explanation |
|
||||
* | --------: |:------------------------------|
|
||||
* | 0 | No error |
|
||||
* | 1 | Invalid call |
|
||||
* | 2 | Not implemented |
|
||||
* | 16 | Connection failed |
|
||||
* | 17 | TLS error |
|
||||
* | 18 | Invalid response from server |
|
||||
* | 100 - 999 | HTTP status codes |
|
||||
* | 65535 | Unknown exception |
|
||||
*/
|
||||
class API
|
||||
{
|
||||
public:
|
||||
|
Reference in New Issue
Block a user