mastodonpp/docs/namespacemastodonpp.html

250 lines
16 KiB
HTML
Raw Normal View History

2020-01-03 12:47:36 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mastodonpp: mastodonpp Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">mastodonpp
&#160;<span id="projectnumber">0.0.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
2020-01-06 14:47:08 +01:00
<a href="#typedef-members">Typedefs</a> &#124;
2020-01-05 13:28:39 +01:00
<a href="#enum-members">Enumerations</a> &#124;
2020-01-03 12:47:36 +01:00
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">mastodonpp Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
2020-01-05 13:28:39 +01:00
<p>C++ wrapper for the Mastodon API.
2020-01-03 12:47:36 +01:00
<a href="namespacemastodonpp.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
2020-01-04 11:40:17 +01:00
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a></td></tr>
2020-01-05 13:28:39 +01:00
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return type for Requests. <a href="structmastodonpp_1_1answer__type.html#details">More...</a><br /></td></tr>
2020-01-04 11:40:17 +01:00
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1API.html">API</a></td></tr>
2020-01-06 09:51:44 +01:00
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Holds API endpoints. <a href="classmastodonpp_1_1API.html#details">More...</a><br /></td></tr>
2020-01-04 11:40:17 +01:00
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
2020-01-05 13:28:39 +01:00
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html">Connection</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents a connection to an instance. Used for requests. <a href="classmastodonpp_1_1Connection.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
2020-01-04 11:40:17 +01:00
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLException.html">CURLException</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception for libcurl errors. <a href="classmastodonpp_1_1CURLException.html#details">More...</a><br /></td></tr>
2020-01-03 12:47:36 +01:00
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
2020-01-05 13:28:39 +01:00
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles the details of network connections. <a href="classmastodonpp_1_1CURLWrapper.html#details">More...</a><br /></td></tr>
2020-01-03 12:47:36 +01:00
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
2020-01-09 18:51:18 +01:00
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1event__type.html">event_type</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A stream event. <a href="structmastodonpp_1_1event__type.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
2020-01-05 13:28:39 +01:00
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Instance.html">Instance</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Holds the access data of an instance. <a href="classmastodonpp_1_1Instance.html#details">More...</a><br /></td></tr>
2020-01-03 12:47:36 +01:00
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
2020-01-06 14:47:08 +01:00
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
2020-01-08 22:43:13 +01:00
<tr class="memitem:ad228a850ba86374f95d9fa1fece3c33b"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> = variant&lt; <a class="el" href="classmastodonpp_1_1API.html#a66d340a2e61c4254feb79f17f6773e4f">API::endpoint_type</a>, string_view &gt;</td></tr>
<tr class="memdesc:ad228a850ba86374f95d9fa1fece3c33b"><td class="mdescLeft">&#160;</td><td class="mdescRight">An endpoint. Either <a class="el" href="classmastodonpp_1_1API.html#a66d340a2e61c4254feb79f17f6773e4f" title="Type for endpoints. Can be API::v1, API::v2, API::oauth, API::other or API::pleroma.">API::endpoint_type</a> or <code>std::string_view</code>. <a href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">More...</a><br /></td></tr>
<tr class="separator:ad228a850ba86374f95d9fa1fece3c33b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8b3b89118adeccc71c54dfd36c987f6"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> = map&lt; string_view, variant&lt; string_view, vector&lt; string_view &gt; &gt;&gt;</td></tr>
2020-01-09 18:51:18 +01:00
<tr class="memdesc:af8b3b89118adeccc71c54dfd36c987f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">std::map of parameters for API calls. <a href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">More...</a><br /></td></tr>
2020-01-08 22:43:13 +01:00
<tr class="separator:af8b3b89118adeccc71c54dfd36c987f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
2020-01-06 14:47:08 +01:00
</table><table class="memberdecls">
2020-01-05 13:28:39 +01:00
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
2020-01-06 09:51:44 +01:00
<tr class="memitem:a7d60fc71ad0fb1fbd467b37fe1f1f100"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">http_method</a> { <br />
&#160;&#160;<b>GET</b>,
<b>POST</b>,
<b>PATCH</b>,
<b>PUT</b>,
<br />
&#160;&#160;<b>DELETE</b>
<br />
2020-01-05 13:28:39 +01:00
}</td></tr>
<tr class="memdesc:a7d60fc71ad0fb1fbd467b37fe1f1f100"><td class="mdescLeft">&#160;</td><td class="mdescRight">The HTTP method. <a href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">More...</a><br /></td></tr>
<tr class="separator:a7d60fc71ad0fb1fbd467b37fe1f1f100"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
2020-01-03 12:47:36 +01:00
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
2020-01-04 11:40:17 +01:00
<tr class="memitem:a9a5182698aabe03eb3a682b40053083d"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#a9a5182698aabe03eb3a682b40053083d">operator&lt;&lt;</a> (std::ostream &amp;out, const <a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> &amp;answer)</td></tr>
<tr class="separator:a9a5182698aabe03eb3a682b40053083d"><td class="memSeparator" colspan="2">&#160;</td></tr>
2020-01-03 12:47:36 +01:00
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
2020-01-05 13:28:39 +01:00
<div class="textblock"><p>C++ wrapper for the Mastodon API. </p>
2020-01-03 12:47:36 +01:00
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
2020-01-06 14:47:08 +01:00
</div><h2 class="groupheader">Typedef Documentation</h2>
2020-01-08 22:43:13 +01:00
<a id="ad228a850ba86374f95d9fa1fece3c33b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad228a850ba86374f95d9fa1fece3c33b">&#9670;&nbsp;</a></span>endpoint_variant</h2>
2020-01-06 14:47:08 +01:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
2020-01-08 22:43:13 +01:00
<td class="memname">using <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">mastodonpp::endpoint_variant</a> = typedef variant&lt;<a class="el" href="classmastodonpp_1_1API.html#a66d340a2e61c4254feb79f17f6773e4f">API::endpoint_type</a>,string_view&gt;</td>
</tr>
</table>
</div><div class="memdoc">
<p>An endpoint. Either <a class="el" href="classmastodonpp_1_1API.html#a66d340a2e61c4254feb79f17f6773e4f" title="Type for endpoints. Can be API::v1, API::v2, API::oauth, API::other or API::pleroma.">API::endpoint_type</a> or <code>std::string_view</code>. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
</div>
</div>
<a id="af8b3b89118adeccc71c54dfd36c987f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8b3b89118adeccc71c54dfd36c987f6">&#9670;&nbsp;</a></span>parametermap</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">mastodonpp::parametermap</a> = typedef map&lt;string_view, variant&lt;string_view, vector&lt;string_view&gt; &gt;&gt;</td>
2020-01-06 14:47:08 +01:00
</tr>
</table>
</div><div class="memdoc">
2020-01-09 18:51:18 +01:00
<p>std::map of parameters for API calls. </p>
2020-01-08 22:43:13 +01:00
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> parameters</div>
2020-01-06 14:47:08 +01:00
<div class="line"> {</div>
<div class="line"> {<span class="stringliteral">&quot;id&quot;</span>, <span class="stringliteral">&quot;12&quot;</span>},</div>
2020-01-08 22:43:13 +01:00
<div class="line"> {<span class="stringliteral">&quot;poll[options]&quot;</span>, vector&lt;string_view&gt;{<span class="stringliteral">&quot;Yes&quot;</span>, <span class="stringliteral">&quot;No&quot;</span>, <span class="stringliteral">&quot;Maybe&quot;</span>}}</div>
2020-01-06 14:47:08 +01:00
<div class="line"> };</div>
</div><!-- fragment --><dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
2020-01-05 13:28:39 +01:00
<a id="a7d60fc71ad0fb1fbd467b37fe1f1f100"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d60fc71ad0fb1fbd467b37fe1f1f100">&#9670;&nbsp;</a></span>http_method</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">mastodonpp::http_method</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The HTTP method. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
2020-01-08 22:43:13 +01:00
<div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;{</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; GET,</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; POST,</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; PATCH,</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; PUT,</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; DELETE</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;};</div>
2020-01-05 13:28:39 +01:00
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
2020-01-04 11:40:17 +01:00
<a id="a9a5182698aabe03eb3a682b40053083d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a5182698aabe03eb3a682b40053083d">&#9670;&nbsp;</a></span>operator&lt;&lt;()</h2>
2020-01-03 12:47:36 +01:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::ostream&amp; mastodonpp::operator&lt;&lt; </td>
<td>(</td>
<td class="paramtype">std::ostream &amp;&#160;</td>
<td class="paramname"><em>out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
2020-01-04 11:40:17 +01:00
<td class="paramtype">const <a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> &amp;&#160;</td>
2020-01-03 12:47:36 +01:00
<td class="paramname"><em>answer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
2020-01-09 18:51:18 +01:00
<div class="fragment"><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;{</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; out &lt;&lt; answer.body;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;}</div>
2020-01-03 12:47:36 +01:00
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
2020-01-08 22:43:13 +01:00
<div class="ttc" id="anamespacemastodonpp_html_af8b3b89118adeccc71c54dfd36c987f6"><div class="ttname"><a href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">mastodonpp::parametermap</a></div><div class="ttdeci">map&lt; string_view, variant&lt; string_view, vector&lt; string_view &gt; &gt;&gt; parametermap</div><div class="ttdoc">std::map of parameters for API calls.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:69</div></div>
2020-01-03 12:47:36 +01:00
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>