789 lines
70 KiB
HTML
789 lines
70 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::Connection Class 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
|
|
 <span id="projectnumber">0.5.1</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&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&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"><a class="el" href="namespacemastodonpp.html">mastodonpp</a></li><li class="navelem"><a class="el" href="classmastodonpp_1_1Connection.html">Connection</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="classmastodonpp_1_1Connection-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">mastodonpp::Connection Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Represents a connection to an instance. Used for requests.
|
|
<a href="classmastodonpp_1_1Connection.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="connection_8hpp_source.html">mastodonpp/connection.hpp</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for mastodonpp::Connection:</div>
|
|
<div class="dyncontent">
|
|
<div class="center">
|
|
<img src="classmastodonpp_1_1Connection.png" usemap="#mastodonpp::Connection_map" alt=""/>
|
|
<map id="mastodonpp::Connection_map" name="mastodonpp::Connection_map">
|
|
<area href="classmastodonpp_1_1CURLWrapper.html" title="Handles the details of network connections." alt="mastodonpp::CURLWrapper" shape="rect" coords="0,0,166,24"/>
|
|
</map>
|
|
</div></div>
|
|
<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:ac5fedffbd59686c26b1e44a7a96c216a"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#ac5fedffbd59686c26b1e44a7a96c216a">Connection</a> (<a class="el" href="classmastodonpp_1_1Instance.html">Instance</a> &instance)</td></tr>
|
|
<tr class="memdesc:ac5fedffbd59686c26b1e44a7a96c216a"><td class="mdescLeft"> </td><td class="mdescRight">Construct a new <a class="el" href="classmastodonpp_1_1Connection.html" title="Represents a connection to an instance. Used for requests.">Connection</a> object. <a href="classmastodonpp_1_1Connection.html#ac5fedffbd59686c26b1e44a7a96c216a">More...</a><br /></td></tr>
|
|
<tr class="separator:ac5fedffbd59686c26b1e44a7a96c216a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ade24a99769313ee15c406d97e9543cba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#ade24a99769313ee15c406d97e9543cba">get</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint, const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters)</td></tr>
|
|
<tr class="memdesc:ade24a99769313ee15c406d97e9543cba"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP GET call with parameters. <a href="classmastodonpp_1_1Connection.html#ade24a99769313ee15c406d97e9543cba">More...</a><br /></td></tr>
|
|
<tr class="separator:ade24a99769313ee15c406d97e9543cba"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a60034eabe75bd3afade110a171c66d05"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#a60034eabe75bd3afade110a171c66d05">get</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint)</td></tr>
|
|
<tr class="memdesc:a60034eabe75bd3afade110a171c66d05"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP GET call. <a href="classmastodonpp_1_1Connection.html#a60034eabe75bd3afade110a171c66d05">More...</a><br /></td></tr>
|
|
<tr class="separator:a60034eabe75bd3afade110a171c66d05"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad7cebeeef7c285ff4666dc6850f20164"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#ad7cebeeef7c285ff4666dc6850f20164">post</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint, const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters)</td></tr>
|
|
<tr class="memdesc:ad7cebeeef7c285ff4666dc6850f20164"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP POST call with parameters. <a href="classmastodonpp_1_1Connection.html#ad7cebeeef7c285ff4666dc6850f20164">More...</a><br /></td></tr>
|
|
<tr class="separator:ad7cebeeef7c285ff4666dc6850f20164"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af27eb5d94f5a0e39a703988fdcc54173"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#af27eb5d94f5a0e39a703988fdcc54173">post</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint)</td></tr>
|
|
<tr class="memdesc:af27eb5d94f5a0e39a703988fdcc54173"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP POST call. <a href="classmastodonpp_1_1Connection.html#af27eb5d94f5a0e39a703988fdcc54173">More...</a><br /></td></tr>
|
|
<tr class="separator:af27eb5d94f5a0e39a703988fdcc54173"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a10f838c74d2ccc83f64f29e2aad2f157"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#a10f838c74d2ccc83f64f29e2aad2f157">patch</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint, const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters)</td></tr>
|
|
<tr class="memdesc:a10f838c74d2ccc83f64f29e2aad2f157"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP PATCH call with parameters. <a href="classmastodonpp_1_1Connection.html#a10f838c74d2ccc83f64f29e2aad2f157">More...</a><br /></td></tr>
|
|
<tr class="separator:a10f838c74d2ccc83f64f29e2aad2f157"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3f1e0440b68a44cf678bfdbe33295197"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#a3f1e0440b68a44cf678bfdbe33295197">patch</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint)</td></tr>
|
|
<tr class="memdesc:a3f1e0440b68a44cf678bfdbe33295197"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP PATCH call. <a href="classmastodonpp_1_1Connection.html#a3f1e0440b68a44cf678bfdbe33295197">More...</a><br /></td></tr>
|
|
<tr class="separator:a3f1e0440b68a44cf678bfdbe33295197"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac5afc2e5d419c8bee3a8994ce0a940aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#ac5afc2e5d419c8bee3a8994ce0a940aa">put</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint, const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters)</td></tr>
|
|
<tr class="memdesc:ac5afc2e5d419c8bee3a8994ce0a940aa"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP PUT call with parameters. <a href="classmastodonpp_1_1Connection.html#ac5afc2e5d419c8bee3a8994ce0a940aa">More...</a><br /></td></tr>
|
|
<tr class="separator:ac5afc2e5d419c8bee3a8994ce0a940aa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad05ff1b33460bfedf0b46f4e5e755399"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#ad05ff1b33460bfedf0b46f4e5e755399">put</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint)</td></tr>
|
|
<tr class="memdesc:ad05ff1b33460bfedf0b46f4e5e755399"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP PUT call. <a href="classmastodonpp_1_1Connection.html#ad05ff1b33460bfedf0b46f4e5e755399">More...</a><br /></td></tr>
|
|
<tr class="separator:ad05ff1b33460bfedf0b46f4e5e755399"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a095f752558410fab3dee6782e03a0fdb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#a095f752558410fab3dee6782e03a0fdb">del</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint, const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters)</td></tr>
|
|
<tr class="memdesc:a095f752558410fab3dee6782e03a0fdb"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP DELETE call with parameters. <a href="classmastodonpp_1_1Connection.html#a095f752558410fab3dee6782e03a0fdb">More...</a><br /></td></tr>
|
|
<tr class="separator:a095f752558410fab3dee6782e03a0fdb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2e89f60fdf4096ff8c8251e61ab59d13"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#a2e89f60fdf4096ff8c8251e61ab59d13">del</a> (const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> &endpoint)</td></tr>
|
|
<tr class="memdesc:a2e89f60fdf4096ff8c8251e61ab59d13"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP DELETE call. <a href="classmastodonpp_1_1Connection.html#a2e89f60fdf4096ff8c8251e61ab59d13">More...</a><br /></td></tr>
|
|
<tr class="separator:a2e89f60fdf4096ff8c8251e61ab59d13"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a06f537c75c7fe9a7510e11af1008e028"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#a06f537c75c7fe9a7510e11af1008e028">get_new_stream_contents</a> ()</td></tr>
|
|
<tr class="memdesc:a06f537c75c7fe9a7510e11af1008e028"><td class="mdescLeft"> </td><td class="mdescRight">Copy new stream contents and delete the “original”. <a href="classmastodonpp_1_1Connection.html#a06f537c75c7fe9a7510e11af1008e028">More...</a><br /></td></tr>
|
|
<tr class="separator:a06f537c75c7fe9a7510e11af1008e028"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7e4a50fb73aa50b027d9a0822cfde318"><td class="memItemLeft" align="right" valign="top">vector< <a class="el" href="structmastodonpp_1_1event__type.html">event_type</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#a7e4a50fb73aa50b027d9a0822cfde318">get_new_events</a> ()</td></tr>
|
|
<tr class="memdesc:a7e4a50fb73aa50b027d9a0822cfde318"><td class="mdescLeft"> </td><td class="mdescRight">Get new stream events. <a href="classmastodonpp_1_1Connection.html#a7e4a50fb73aa50b027d9a0822cfde318">More...</a><br /></td></tr>
|
|
<tr class="separator:a7e4a50fb73aa50b027d9a0822cfde318"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8cf6ab350bb359650925d1c582fe9f60"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html#a8cf6ab350bb359650925d1c582fe9f60">cancel_stream</a> ()</td></tr>
|
|
<tr class="memdesc:a8cf6ab350bb359650925d1c582fe9f60"><td class="mdescLeft"> </td><td class="mdescRight">Cancel the stream. <a href="classmastodonpp_1_1Connection.html#a8cf6ab350bb359650925d1c582fe9f60">More...</a><br /></td></tr>
|
|
<tr class="separator:a8cf6ab350bb359650925d1c582fe9f60"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="inherit_header pub_methods_classmastodonpp_1_1CURLWrapper"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classmastodonpp_1_1CURLWrapper')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classmastodonpp_1_1CURLWrapper.html">mastodonpp::CURLWrapper</a></td></tr>
|
|
<tr class="memitem:a736572303fbec7a307514e611e6a468c inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a736572303fbec7a307514e611e6a468c">CURLWrapper</a> ()</td></tr>
|
|
<tr class="memdesc:a736572303fbec7a307514e611e6a468c inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Initializes curl and sets up connection. <a href="classmastodonpp_1_1CURLWrapper.html#a736572303fbec7a307514e611e6a468c">More...</a><br /></td></tr>
|
|
<tr class="separator:a736572303fbec7a307514e611e6a468c inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a108929a9985c76a8e2cd1f531ac6d321 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a108929a9985c76a8e2cd1f531ac6d321">CURLWrapper</a> (const <a class="el" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> &other)=delete</td></tr>
|
|
<tr class="memdesc:a108929a9985c76a8e2cd1f531ac6d321 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <a href="classmastodonpp_1_1CURLWrapper.html#a108929a9985c76a8e2cd1f531ac6d321">More...</a><br /></td></tr>
|
|
<tr class="separator:a108929a9985c76a8e2cd1f531ac6d321 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4d79b9a4525ac4b4b8954ccc794af0f9 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a4d79b9a4525ac4b4b8954ccc794af0f9">CURLWrapper</a> (<a class="el" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> &&other) noexcept=delete</td></tr>
|
|
<tr class="memdesc:a4d79b9a4525ac4b4b8954ccc794af0f9 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Move constructor. <a href="classmastodonpp_1_1CURLWrapper.html#a4d79b9a4525ac4b4b8954ccc794af0f9">More...</a><br /></td></tr>
|
|
<tr class="separator:a4d79b9a4525ac4b4b8954ccc794af0f9 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a350f7061c9cb54cb5992ae983db3fc19 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a350f7061c9cb54cb5992ae983db3fc19">~CURLWrapper</a> () noexcept</td></tr>
|
|
<tr class="memdesc:a350f7061c9cb54cb5992ae983db3fc19 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Cleans up curl and connection. <a href="classmastodonpp_1_1CURLWrapper.html#a350f7061c9cb54cb5992ae983db3fc19">More...</a><br /></td></tr>
|
|
<tr class="separator:a350f7061c9cb54cb5992ae983db3fc19 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5f29b7f4d0b58f70bc96f362cdaa4d0a inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a5f29b7f4d0b58f70bc96f362cdaa4d0a">operator=</a> (const <a class="el" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> &other)=delete</td></tr>
|
|
<tr class="memdesc:a5f29b7f4d0b58f70bc96f362cdaa4d0a inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Copy assignment operator. <a href="classmastodonpp_1_1CURLWrapper.html#a5f29b7f4d0b58f70bc96f362cdaa4d0a">More...</a><br /></td></tr>
|
|
<tr class="separator:a5f29b7f4d0b58f70bc96f362cdaa4d0a inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a506cb49c00a63ef4b9d51d0d52c203dc inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a506cb49c00a63ef4b9d51d0d52c203dc">operator=</a> (<a class="el" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> &&other) noexcept=delete</td></tr>
|
|
<tr class="memdesc:a506cb49c00a63ef4b9d51d0d52c203dc inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Move assignment operator. <a href="classmastodonpp_1_1CURLWrapper.html#a506cb49c00a63ef4b9d51d0d52c203dc">More...</a><br /></td></tr>
|
|
<tr class="separator:a506cb49c00a63ef4b9d51d0d52c203dc inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2b7aaf03245a0730eeb464802168aded inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">CURL * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a2b7aaf03245a0730eeb464802168aded">get_curl_easy_handle</a> ()</td></tr>
|
|
<tr class="memdesc:a2b7aaf03245a0730eeb464802168aded inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Returns pointer to the CURL easy handle. <a href="classmastodonpp_1_1CURLWrapper.html#a2b7aaf03245a0730eeb464802168aded">More...</a><br /></td></tr>
|
|
<tr class="separator:a2b7aaf03245a0730eeb464802168aded inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a11a543a0821a275dfce1ad7a0e68b17f inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a11a543a0821a275dfce1ad7a0e68b17f">escape_url</a> (const string_view url) const</td></tr>
|
|
<tr class="memdesc:a11a543a0821a275dfce1ad7a0e68b17f inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">URL encodes the given string. <a href="classmastodonpp_1_1CURLWrapper.html#a11a543a0821a275dfce1ad7a0e68b17f">More...</a><br /></td></tr>
|
|
<tr class="separator:a11a543a0821a275dfce1ad7a0e68b17f inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aed6d09b5c32d71276a851ddf321b5891 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#aed6d09b5c32d71276a851ddf321b5891">unescape_url</a> (const string_view url) const</td></tr>
|
|
<tr class="memdesc:aed6d09b5c32d71276a851ddf321b5891 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">URL decodes the given string. <a href="classmastodonpp_1_1CURLWrapper.html#aed6d09b5c32d71276a851ddf321b5891">More...</a><br /></td></tr>
|
|
<tr class="separator:aed6d09b5c32d71276a851ddf321b5891 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0059ecb78b53c4b3c941b19f8dc897f7 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a0059ecb78b53c4b3c941b19f8dc897f7">setup_connection_properties</a> (string_view proxy, string_view access_token, string_view cainfo, string_view useragent)</td></tr>
|
|
<tr class="memdesc:a0059ecb78b53c4b3c941b19f8dc897f7 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Set some properties of the connection. <a href="classmastodonpp_1_1CURLWrapper.html#a0059ecb78b53c4b3c941b19f8dc897f7">More...</a><br /></td></tr>
|
|
<tr class="separator:a0059ecb78b53c4b3c941b19f8dc897f7 inherit pub_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
|
|
Additional Inherited Members</h2></td></tr>
|
|
<tr class="inherit_header pro_methods_classmastodonpp_1_1CURLWrapper"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classmastodonpp_1_1CURLWrapper')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classmastodonpp_1_1CURLWrapper.html">mastodonpp::CURLWrapper</a></td></tr>
|
|
<tr class="memitem:adc8808c3fad5397176f6755b09ee0be6 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">make_request</a> (const <a class="el" href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">http_method</a> &method, string uri, const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters)</td></tr>
|
|
<tr class="memdesc:adc8808c3fad5397176f6755b09ee0be6 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Make a HTTP request. <a href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">More...</a><br /></td></tr>
|
|
<tr class="separator:adc8808c3fad5397176f6755b09ee0be6 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a04b3919cfb38716c5a032337e442db95 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a04b3919cfb38716c5a032337e442db95">get_buffer</a> ()</td></tr>
|
|
<tr class="memdesc:a04b3919cfb38716c5a032337e442db95 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Returns a reference to the buffer libcurl writes into. <a href="classmastodonpp_1_1CURLWrapper.html#a04b3919cfb38716c5a032337e442db95">More...</a><br /></td></tr>
|
|
<tr class="separator:a04b3919cfb38716c5a032337e442db95 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a892a4fc3d048798fa8e2584545b91861 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a892a4fc3d048798fa8e2584545b91861">cancel_stream</a> ()</td></tr>
|
|
<tr class="memdesc:a892a4fc3d048798fa8e2584545b91861 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Cancel the stream. <a href="classmastodonpp_1_1CURLWrapper.html#a892a4fc3d048798fa8e2584545b91861">More...</a><br /></td></tr>
|
|
<tr class="separator:a892a4fc3d048798fa8e2584545b91861 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1564a42794ef7a9d170b725063ef504d inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a1564a42794ef7a9d170b725063ef504d">set_proxy</a> (string_view proxy)</td></tr>
|
|
<tr class="memdesc:a1564a42794ef7a9d170b725063ef504d inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Set the proxy to use. <a href="classmastodonpp_1_1CURLWrapper.html#a1564a42794ef7a9d170b725063ef504d">More...</a><br /></td></tr>
|
|
<tr class="separator:a1564a42794ef7a9d170b725063ef504d inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a94aba6daedea376ccc20e5c983bd3358 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#a94aba6daedea376ccc20e5c983bd3358">set_access_token</a> (string_view access_token)</td></tr>
|
|
<tr class="memdesc:a94aba6daedea376ccc20e5c983bd3358 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Set OAuth 2.0 Bearer Access Token. <a href="classmastodonpp_1_1CURLWrapper.html#a94aba6daedea376ccc20e5c983bd3358">More...</a><br /></td></tr>
|
|
<tr class="separator:a94aba6daedea376ccc20e5c983bd3358 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af3f2bd4dea7c289d590fe19889360444 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#af3f2bd4dea7c289d590fe19889360444">set_cainfo</a> (string_view path)</td></tr>
|
|
<tr class="memdesc:af3f2bd4dea7c289d590fe19889360444 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Set path to Certificate Authority (CA) bundle. <a href="classmastodonpp_1_1CURLWrapper.html#af3f2bd4dea7c289d590fe19889360444">More...</a><br /></td></tr>
|
|
<tr class="separator:af3f2bd4dea7c289d590fe19889360444 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae3b1445f9b94b1f7677d3cac6d538612 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#ae3b1445f9b94b1f7677d3cac6d538612">set_useragent</a> (string_view useragent)</td></tr>
|
|
<tr class="memdesc:ae3b1445f9b94b1f7677d3cac6d538612 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Sets the User-Agent. <a href="classmastodonpp_1_1CURLWrapper.html#ae3b1445f9b94b1f7677d3cac6d538612">More...</a><br /></td></tr>
|
|
<tr class="separator:ae3b1445f9b94b1f7677d3cac6d538612 inherit pro_methods_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="inherit_header pro_attribs_classmastodonpp_1_1CURLWrapper"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classmastodonpp_1_1CURLWrapper')"><img src="closed.png" alt="-"/> Protected Attributes inherited from <a class="el" href="classmastodonpp_1_1CURLWrapper.html">mastodonpp::CURLWrapper</a></td></tr>
|
|
<tr class="memitem:af7e18dc7c3bdc1c58bc93a46bf00866a inherit pro_attribs_classmastodonpp_1_1CURLWrapper"><td class="memItemLeft" align="right" valign="top">mutex </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html#af7e18dc7c3bdc1c58bc93a46bf00866a">_buffer_mutex</a></td></tr>
|
|
<tr class="memdesc:af7e18dc7c3bdc1c58bc93a46bf00866a inherit pro_attribs_classmastodonpp_1_1CURLWrapper"><td class="mdescLeft"> </td><td class="mdescRight">Mutex for <a class="el" href="classmastodonpp_1_1CURLWrapper.html#a04b3919cfb38716c5a032337e442db95" title="Returns a reference to the buffer libcurl writes into.">get_buffer</a> a.k.a. _curl_buffer_body. <a href="classmastodonpp_1_1CURLWrapper.html#af7e18dc7c3bdc1c58bc93a46bf00866a">More...</a><br /></td></tr>
|
|
<tr class="separator:af7e18dc7c3bdc1c58bc93a46bf00866a inherit pro_attribs_classmastodonpp_1_1CURLWrapper"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Represents a connection to an instance. Used for requests. </p>
|
|
<p>Do not make 2 requests with the same <a class="el" href="classmastodonpp_1_1Connection.html" title="Represents a connection to an instance. Used for requests.">Connection</a> at the same time. You can create as many <a class="el" href="classmastodonpp_1_1Connection.html" title="Represents a connection to an instance. Used for requests.">Connection</a>s as you want from one <a class="el" href="classmastodonpp_1_1Instance.html" title="Holds the access data of an instance.">Instance</a>.</p>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="ac5fedffbd59686c26b1e44a7a96c216a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac5fedffbd59686c26b1e44a7a96c216a">◆ </a></span>Connection()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">mastodonpp::Connection::Connection </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classmastodonpp_1_1Instance.html">Instance</a> & </td>
|
|
<td class="paramname"><em>instance</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct a new <a class="el" href="classmastodonpp_1_1Connection.html" title="Represents a connection to an instance. Used for requests.">Connection</a> object. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">instance</td><td>An <a class="el" href="classmastodonpp_1_1Instance.html" title="Holds the access data of an instance.">Instance</a> with the access data.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  : _instance{instance}</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  , _baseuri{instance.get_baseuri()}</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  {</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  _instance.<a class="code" href="classmastodonpp_1_1Instance.html#aa486bc453907439e33f8402f270ef384">copy_connection_properties</a>(*<span class="keyword">this</span>);</div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a8cf6ab350bb359650925d1c582fe9f60"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8cf6ab350bb359650925d1c582fe9f60">◆ </a></span>cancel_stream()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void mastodonpp::Connection::cancel_stream </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Cancel the stream. </p>
|
|
<p>The stream will be cancelled, usually whithin a second. The <a class="el" href="structmastodonpp_1_1answer__type.html#a7c5582c4500034c0ea36ab1694944139">curl_error_code </a> of the answer will be set to 42 (<code>CURLE_ABORTED_BY_CALLBACK</code>).</p>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  {</div>
|
|
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a892a4fc3d048798fa8e2584545b91861">CURLWrapper::cancel_stream</a>();</div>
|
|
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a2e89f60fdf4096ff8c8251e61ab59d13"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2e89f60fdf4096ff8c8251e61ab59d13">◆ </a></span>del() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::del </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP DELETE call. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.2.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  {</div>
|
|
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#a095f752558410fab3dee6782e03a0fdb">del</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a095f752558410fab3dee6782e03a0fdb"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a095f752558410fab3dee6782e03a0fdb">◆ </a></span>del() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::del </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> & </td>
|
|
<td class="paramname"><em>parameters</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP DELETE call with parameters. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>. </td></tr>
|
|
<tr><td class="paramname">parameters</td><td>A map of parameters.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.2.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> {</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">make_request</a>(http_method::DELETE,</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  endpoint_to_uri(endpoint), parameters);</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a60034eabe75bd3afade110a171c66d05"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a60034eabe75bd3afade110a171c66d05">◆ </a></span>get() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::get </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP GET call. </p>
|
|
<p>Example: </p><div class="fragment"><div class="line"><span class="keyword">auto</span> answer{connection.get(<span class="stringliteral">"/api/v1/instance"</span>)};</div>
|
|
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  {</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#ade24a99769313ee15c406d97e9543cba">get</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="ade24a99769313ee15c406d97e9543cba"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ade24a99769313ee15c406d97e9543cba">◆ </a></span>get() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::get </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> & </td>
|
|
<td class="paramname"><em>parameters</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP GET call with parameters. </p>
|
|
<p>Example: </p><div class="fragment"><div class="line"><span class="keyword">auto</span> answer{connection.get(mastodonpp::API::v1::accounts_id_followers,</div>
|
|
<div class="line"> {</div>
|
|
<div class="line"> {<span class="stringliteral">"id"</span>, <span class="stringliteral">"12"</span>},</div>
|
|
<div class="line"> {<span class="stringliteral">"limit"</span>, <span class="stringliteral">"10"</span>}</div>
|
|
<div class="line"> })};</div>
|
|
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>. </td></tr>
|
|
<tr><td class="paramname">parameters</td><td>A map of parameters.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">make_request</a>(http_method::GET,</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  endpoint_to_uri(endpoint), parameters);</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a7e4a50fb73aa50b027d9a0822cfde318"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7e4a50fb73aa50b027d9a0822cfde318">◆ </a></span>get_new_events()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">vector< <a class="el" href="structmastodonpp_1_1event__type.html">event_type</a> > mastodonpp::Connection::get_new_events </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get new stream events. </p>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> {</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <a class="code" href="classmastodonpp_1_1CURLWrapper.html#af7e18dc7c3bdc1c58bc93a46bf00866a">_buffer_mutex</a>.lock();</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keyword">auto</span> &buffer{<a class="code" href="classmastodonpp_1_1CURLWrapper.html#a04b3919cfb38716c5a032337e442db95">get_buffer</a>()};</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  vector<event_type> events;</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  </div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordtype">size_t</span> pos{0};</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  constexpr string_view search_event{<span class="stringliteral">"event: "</span>};</div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">while</span> ((pos = buffer.find(search_event)) != string::npos)</div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  {</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keyword">const</span> <span class="keyword">auto</span> endpos{buffer.find(<span class="stringliteral">"\n\n"</span>, pos)};</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keywordflow">if</span> (endpos == string::npos)</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  {</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  </div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  event_type event;</div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  pos += search_event.size();</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keyword">event</span>.type = buffer.substr(pos, buffer.find(<span class="charliteral">'\n'</span>, pos) - pos);</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  constexpr string_view search_data{<span class="stringliteral">"data: "</span>};</div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  pos = buffer.find(search_data) + search_data.size();</div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keyword">event</span>.data = buffer.substr(pos, endpos - pos);</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  events.push_back(event);</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  </div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  buffer.erase(0, endpos);</div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  }</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  </div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="classmastodonpp_1_1CURLWrapper.html#af7e18dc7c3bdc1c58bc93a46bf00866a">_buffer_mutex</a>.unlock();</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">return</span> events;</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a06f537c75c7fe9a7510e11af1008e028"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a06f537c75c7fe9a7510e11af1008e028">◆ </a></span>get_new_stream_contents()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">string mastodonpp::Connection::get_new_stream_contents </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Copy new stream contents and delete the “original”. </p>
|
|
<p>Note that the last event is not necessarily complete, it could happen that you are calling this function mid-transfer. You have to check the data integrity yourself.</p>
|
|
<p>Using <a class="el" href="classmastodonpp_1_1Connection.html#a7e4a50fb73aa50b027d9a0822cfde318" title="Get new stream events.">get_new_events()</a> instead is recommended.</p>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> {</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="classmastodonpp_1_1CURLWrapper.html#af7e18dc7c3bdc1c58bc93a46bf00866a">_buffer_mutex</a>.lock();</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keyword">auto</span> &buffer{<a class="code" href="classmastodonpp_1_1CURLWrapper.html#a04b3919cfb38716c5a032337e442db95">get_buffer</a>()};</div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> buffer_copy{buffer};</div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  buffer.clear();</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="classmastodonpp_1_1CURLWrapper.html#af7e18dc7c3bdc1c58bc93a46bf00866a">_buffer_mutex</a>.unlock();</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span> buffer_copy;</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a3f1e0440b68a44cf678bfdbe33295197"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3f1e0440b68a44cf678bfdbe33295197">◆ </a></span>patch() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::patch </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP PATCH call. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.2.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  {</div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#a10f838c74d2ccc83f64f29e2aad2f157">patch</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a10f838c74d2ccc83f64f29e2aad2f157"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a10f838c74d2ccc83f64f29e2aad2f157">◆ </a></span>patch() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::patch </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> & </td>
|
|
<td class="paramname"><em>parameters</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP PATCH call with parameters. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>. </td></tr>
|
|
<tr><td class="paramname">parameters</td><td>A map of parameters.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.2.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> {</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">make_request</a>(http_method::PATCH,</div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  endpoint_to_uri(endpoint), parameters);</div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="af27eb5d94f5a0e39a703988fdcc54173"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af27eb5d94f5a0e39a703988fdcc54173">◆ </a></span>post() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::post </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP POST call. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  {</div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#ad7cebeeef7c285ff4666dc6850f20164">post</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="ad7cebeeef7c285ff4666dc6850f20164"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad7cebeeef7c285ff4666dc6850f20164">◆ </a></span>post() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::post </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> & </td>
|
|
<td class="paramname"><em>parameters</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP POST call with parameters. </p>
|
|
<p>Example: </p><div class="fragment"><div class="line"><span class="keyword">auto</span> answer{connection.post(</div>
|
|
<div class="line"> mastodonpp::API::v1::statuses,</div>
|
|
<div class="line"> {</div>
|
|
<div class="line"> {<span class="stringliteral">"status"</span>, <span class="stringliteral">"How is the wheather?"</span>},</div>
|
|
<div class="line"> {<span class="stringliteral">"poll[options]"</span>, vector<string_view>{<span class="stringliteral">"Nice"</span>, <span class="stringliteral">"not nice"</span>}},</div>
|
|
<div class="line"> {<span class="stringliteral">"poll[expires_in]"</span>, to_string(poll_seconds)}</div>
|
|
<div class="line"> })};</div>
|
|
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>. </td></tr>
|
|
<tr><td class="paramname">parameters</td><td>A map of parameters.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> {</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">make_request</a>(http_method::POST,</div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  endpoint_to_uri(endpoint), parameters);</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="ad05ff1b33460bfedf0b46f4e5e755399"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad05ff1b33460bfedf0b46f4e5e755399">◆ </a></span>put() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::put </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP PUT call. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.2.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  {</div>
|
|
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#ac5afc2e5d419c8bee3a8994ce0a940aa">put</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="ac5afc2e5d419c8bee3a8994ce0a940aa"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac5afc2e5d419c8bee3a8994ce0a940aa">◆ </a></span>put() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> mastodonpp::Connection::put </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b">endpoint_variant</a> & </td>
|
|
<td class="paramname"><em>endpoint</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> & </td>
|
|
<td class="paramname"><em>parameters</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a HTTP PUT call with parameters. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">endpoint</td><td>Endpoint as <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>. </td></tr>
|
|
<tr><td class="paramname">parameters</td><td>A map of parameters.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.2.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> {</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">make_request</a>(http_method::PUT,</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  endpoint_to_uri(endpoint), parameters);</div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li>include/<a class="el" href="connection_8hpp_source.html">connection.hpp</a></li>
|
|
<li>src/connection.cpp</li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_ade24a99769313ee15c406d97e9543cba"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#ade24a99769313ee15c406d97e9543cba">mastodonpp::Connection::get</a></div><div class="ttdeci">answer_type get(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP GET call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:34</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_af7e18dc7c3bdc1c58bc93a46bf00866a"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#af7e18dc7c3bdc1c58bc93a46bf00866a">mastodonpp::CURLWrapper::_buffer_mutex</a></div><div class="ttdeci">mutex _buffer_mutex</div><div class="ttdoc">Mutex for get_buffer a.k.a. _curl_buffer_body.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:175</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_ac5afc2e5d419c8bee3a8994ce0a940aa"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#ac5afc2e5d419c8bee3a8994ce0a940aa">mastodonpp::Connection::put</a></div><div class="ttdeci">answer_type put(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP PUT call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:55</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_a04b3919cfb38716c5a032337e442db95"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#a04b3919cfb38716c5a032337e442db95">mastodonpp::CURLWrapper::get_buffer</a></div><div class="ttdeci">string & get_buffer()</div><div class="ttdoc">Returns a reference to the buffer libcurl writes into.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:196</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a095f752558410fab3dee6782e03a0fdb"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a095f752558410fab3dee6782e03a0fdb">mastodonpp::Connection::del</a></div><div class="ttdeci">answer_type del(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP DELETE call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:62</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a10f838c74d2ccc83f64f29e2aad2f157"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a10f838c74d2ccc83f64f29e2aad2f157">mastodonpp::Connection::patch</a></div><div class="ttdeci">answer_type patch(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP PATCH call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:48</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_ad7cebeeef7c285ff4666dc6850f20164"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#ad7cebeeef7c285ff4666dc6850f20164">mastodonpp::Connection::post</a></div><div class="ttdeci">answer_type post(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP POST call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:41</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Instance_html_aa486bc453907439e33f8402f270ef384"><div class="ttname"><a href="classmastodonpp_1_1Instance.html#aa486bc453907439e33f8402f270ef384">mastodonpp::Instance::copy_connection_properties</a></div><div class="ttdeci">void copy_connection_properties(CURLWrapper &curlwrapper)</div><div class="ttdoc">Set the properties of the connection of the calling class up.</div><div class="ttdef"><b>Definition:</b> instance.hpp:78</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_adc8808c3fad5397176f6755b09ee0be6"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">mastodonpp::CURLWrapper::make_request</a></div><div class="ttdeci">answer_type make_request(const http_method &method, string uri, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP request.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.cpp:70</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_a892a4fc3d048798fa8e2584545b91861"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#a892a4fc3d048798fa8e2584545b91861">mastodonpp::CURLWrapper::cancel_stream</a></div><div class="ttdeci">void cancel_stream()</div><div class="ttdoc">Cancel the stream.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:210</div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.16
|
|
</small></address>
|
|
</body>
|
|
</html>
|