mastodonpp/docs/structmastodonpp_1_1answer.html
2020-01-03 11:14:21 +01:00

316 lines
17 KiB
HTML

<!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::answer Struct 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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>mastodonpp</b></li><li class="navelem"><a class="el" href="structmastodonpp_1_1answer.html">answer</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="structmastodonpp_1_1answer-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mastodonpp::answer Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Return type for <a class="el" href="classmastodonpp_1_1API.html" title="C++ wrapper for the Mastodon API.">API</a> calls.
<a href="structmastodonpp_1_1answer.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="return__types_8hpp_source.html">return_types.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a38e12666a606aed6aa67856ce95c5c8a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1answer.html#a38e12666a606aed6aa67856ce95c5c8a">operator bool</a> () const</td></tr>
<tr class="memdesc:a38e12666a606aed6aa67856ce95c5c8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if <a class="el" href="structmastodonpp_1_1answer.html#aa7681cb7229011f96c61bddaaafbfe97" title="Error code.">answer::error_code</a> is 0, false otherwise. <a href="structmastodonpp_1_1answer.html#a38e12666a606aed6aa67856ce95c5c8a">More...</a><br /></td></tr>
<tr class="separator:a38e12666a606aed6aa67856ce95c5c8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57745d8745f56c56c34ac5080aae0184"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1answer.html#a57745d8745f56c56c34ac5080aae0184">operator string_view</a> () const</td></tr>
<tr class="memdesc:a57745d8745f56c56c34ac5080aae0184"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <a class="el" href="structmastodonpp_1_1answer.html#a6ea3eebf8b9d51f4af487ff23833d512" title="The response from the server, usually JSON.">answer::body</a> as std::string_view. <a href="structmastodonpp_1_1answer.html#a57745d8745f56c56c34ac5080aae0184">More...</a><br /></td></tr>
<tr class="separator:a57745d8745f56c56c34ac5080aae0184"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa7681cb7229011f96c61bddaaafbfe97"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1answer.html#aa7681cb7229011f96c61bddaaafbfe97">error_code</a></td></tr>
<tr class="memdesc:aa7681cb7229011f96c61bddaaafbfe97"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structmastodonpp_1_1answer.html#error">Error code</a>. <a href="structmastodonpp_1_1answer.html#aa7681cb7229011f96c61bddaaafbfe97">More...</a><br /></td></tr>
<tr class="separator:aa7681cb7229011f96c61bddaaafbfe97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf25531f90679a6f90a5e4be52bb1cc2"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1answer.html#abf25531f90679a6f90a5e4be52bb1cc2">error_message</a></td></tr>
<tr class="memdesc:abf25531f90679a6f90a5e4be52bb1cc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The error message. <a href="structmastodonpp_1_1answer.html#abf25531f90679a6f90a5e4be52bb1cc2">More...</a><br /></td></tr>
<tr class="separator:abf25531f90679a6f90a5e4be52bb1cc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad57134c02b5c49776600162508a16595"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1answer.html#ad57134c02b5c49776600162508a16595">http_status</a></td></tr>
<tr class="memdesc:ad57134c02b5c49776600162508a16595"><td class="mdescLeft">&#160;</td><td class="mdescRight">HTTP status code. <a href="structmastodonpp_1_1answer.html#ad57134c02b5c49776600162508a16595">More...</a><br /></td></tr>
<tr class="separator:ad57134c02b5c49776600162508a16595"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ea3eebf8b9d51f4af487ff23833d512"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1answer.html#a6ea3eebf8b9d51f4af487ff23833d512">body</a></td></tr>
<tr class="memdesc:a6ea3eebf8b9d51f4af487ff23833d512"><td class="mdescLeft">&#160;</td><td class="mdescRight">The response from the server, usually JSON. <a href="structmastodonpp_1_1answer.html#a6ea3eebf8b9d51f4af487ff23833d512">More...</a><br /></td></tr>
<tr class="separator:a6ea3eebf8b9d51f4af487ff23833d512"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a0f5fea38357a2ab0acc928d9f2086447"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1answer.html#a0f5fea38357a2ab0acc928d9f2086447">operator&lt;&lt;</a> (std::ostream &amp;out, const <a class="el" href="structmastodonpp_1_1answer.html">answer</a> &amp;<a class="el" href="structmastodonpp_1_1answer.html">answer</a>)</td></tr>
<tr class="memdesc:a0f5fea38357a2ab0acc928d9f2086447"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <a class="el" href="structmastodonpp_1_1answer.html#a6ea3eebf8b9d51f4af487ff23833d512" title="The response from the server, usually JSON.">answer::body</a> as std::ostream. <a href="structmastodonpp_1_1answer.html#a0f5fea38357a2ab0acc928d9f2086447">More...</a><br /></td></tr>
<tr class="separator:a0f5fea38357a2ab0acc928d9f2086447"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Return type for <a class="el" href="classmastodonpp_1_1API.html" title="C++ wrapper for the Mastodon API.">API</a> calls. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0</dd></dl>
<h1><a class="anchor" id="error"></a>
Error codes</h1>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Code </th><th class="markdownTableHeadLeft">Explanation </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight">0 </td><td class="markdownTableBodyLeft">No error. </td></tr>
</table>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a38e12666a606aed6aa67856ce95c5c8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38e12666a606aed6aa67856ce95c5c8a">&#9670;&nbsp;</a></span>operator bool()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mastodonpp::answer::operator bool </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if <a class="el" href="structmastodonpp_1_1answer.html#aa7681cb7229011f96c61bddaaafbfe97" title="Error code.">answer::error_code</a> is 0, false otherwise. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
<div class="fragment"><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;{</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; <span class="keywordflow">return</span> (<a class="code" href="structmastodonpp_1_1answer.html#aa7681cb7229011f96c61bddaaafbfe97">error_code</a> == 0);</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a57745d8745f56c56c34ac5080aae0184"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57745d8745f56c56c34ac5080aae0184">&#9670;&nbsp;</a></span>operator string_view()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mastodonpp::answer::operator string_view </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns <a class="el" href="structmastodonpp_1_1answer.html#a6ea3eebf8b9d51f4af487ff23833d512" title="The response from the server, usually JSON.">answer::body</a> as std::string_view. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
<div class="fragment"><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;{</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <span class="keywordflow">return</span> <a class="code" href="structmastodonpp_1_1answer.html#a6ea3eebf8b9d51f4af487ff23833d512">body</a>;</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a0f5fea38357a2ab0acc928d9f2086447"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f5fea38357a2ab0acc928d9f2086447">&#9670;&nbsp;</a></span>operator&lt;&lt;</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::ostream&amp; 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>
<td class="paramtype">const <a class="el" href="structmastodonpp_1_1answer.html">answer</a> &amp;&#160;</td>
<td class="paramname"><em>answer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns <a class="el" href="structmastodonpp_1_1answer.html#a6ea3eebf8b9d51f4af487ff23833d512" title="The response from the server, usually JSON.">answer::body</a> as std::ostream. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
<div class="fragment"><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;{</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; out &lt;&lt; answer.body;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a6ea3eebf8b9d51f4af487ff23833d512"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ea3eebf8b9d51f4af487ff23833d512">&#9670;&nbsp;</a></span>body</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string mastodonpp::answer::body</td>
</tr>
</table>
</div><div class="memdoc">
<p>The response from the server, usually JSON. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
</div>
</div>
<a id="aa7681cb7229011f96c61bddaaafbfe97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7681cb7229011f96c61bddaaafbfe97">&#9670;&nbsp;</a></span>error_code</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t mastodonpp::answer::error_code</td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="structmastodonpp_1_1answer.html#error">Error code</a>. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
</div>
</div>
<a id="abf25531f90679a6f90a5e4be52bb1cc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf25531f90679a6f90a5e4be52bb1cc2">&#9670;&nbsp;</a></span>error_message</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string mastodonpp::answer::error_message</td>
</tr>
</table>
</div><div class="memdoc">
<p>The error message. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
</div>
</div>
<a id="ad57134c02b5c49776600162508a16595"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad57134c02b5c49776600162508a16595">&#9670;&nbsp;</a></span>http_status</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t mastodonpp::answer::http_status</td>
</tr>
</table>
</div><div class="memdoc">
<p>HTTP status code. </p>
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>include/<a class="el" href="return__types_8hpp_source.html">return_types.hpp</a></li>
<li>src/return_types.cpp</li>
</ul>
</div><!-- contents -->
<div class="ttc" id="astructmastodonpp_1_1answer_html_a6ea3eebf8b9d51f4af487ff23833d512"><div class="ttname"><a href="structmastodonpp_1_1answer.html#a6ea3eebf8b9d51f4af487ff23833d512">mastodonpp::answer::body</a></div><div class="ttdeci">string body</div><div class="ttdoc">The response from the server, usually JSON.</div><div class="ttdef"><b>Definition:</b> return_types.hpp:67</div></div>
<div class="ttc" id="astructmastodonpp_1_1answer_html_aa7681cb7229011f96c61bddaaafbfe97"><div class="ttname"><a href="structmastodonpp_1_1answer.html#aa7681cb7229011f96c61bddaaafbfe97">mastodonpp::answer::error_code</a></div><div class="ttdeci">uint8_t error_code</div><div class="ttdoc">Error code.</div><div class="ttdef"><b>Definition:</b> return_types.hpp:49</div></div>
<!-- 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>