2020-01-20
This commit is contained in:
parent
cf3c900190
commit
4ba385c7cb
|
@ -284,7 +284,7 @@ Additional Inherited Members</h2></td></tr>
|
|||
|
||||
<p>Creates a token via <code>/oauth/token</code>. </p>
|
||||
<p>The <code>body</code> of the returned <a class="el" href="structmastodonpp_1_1answer__type.html">answer </a> contains only the access token, not the whole JSON response.</p>
|
||||
<p>The access token will be set in the parent <a class="el" href="classmastodonpp_1_1Instance.html" title="Holds the access data of an instance.">Instance</a>.</p>
|
||||
<p>The access token will be set in the <a class="el" href="classmastodonpp_1_1Instance.html" title="Holds the access data of an instance.">Instance</a> you initialized <a class="el" href="classmastodonpp_1_1Instance_1_1ObtainToken.html" title="Simplifies obtaining an OAuth 2.0 Bearer Access Token.">ObtainToken</a> with.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">code</td><td>The authorization code you got from the user.</td></tr>
|
||||
|
|
|
@ -187,31 +187,31 @@ $(function() {
|
|||
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  answer_type <a class="code" href="classmastodonpp_1_1Instance_1_1ObtainToken.html#a5bd5d631e2fbb186a9df66d2ac3f5402">step_1</a>(string_view client_name, string_view scopes,</div>
|
||||
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  string_view website);</div>
|
||||
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  </div>
|
||||
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  [[nodiscard]]</div>
|
||||
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  answer_type <a class="code" href="classmastodonpp_1_1Instance_1_1ObtainToken.html#addda7f4e1ca4200235764707478f6d51">step_2</a>(string_view code);</div>
|
||||
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  </div>
|
||||
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <a class="code" href="classmastodonpp_1_1Instance.html#a04dc593589b69f9f71c4acecb39d995a">Instance</a> &_instance;</div>
|
||||
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> _baseuri;</div>
|
||||
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keywordtype">string</span> _scopes;</div>
|
||||
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordtype">string</span> _client_id;</div>
|
||||
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordtype">string</span> _client_secret;</div>
|
||||
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  };</div>
|
||||
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  </div>
|
||||
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> _hostname;</div>
|
||||
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> _baseuri;</div>
|
||||
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="keywordtype">string</span> _access_token;</div>
|
||||
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  uint64_t _max_chars;</div>
|
||||
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordtype">string</span> _proxy;</div>
|
||||
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  vector<string> _post_formats;</div>
|
||||
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <span class="keywordtype">string</span> _cainfo;</div>
|
||||
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keywordtype">string</span> _useragent;</div>
|
||||
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span> };</div>
|
||||
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  </div>
|
||||
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span> } <span class="comment">// namespace mastodonpp</span></div>
|
||||
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  </div>
|
||||
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span> <span class="preprocessor">#endif // MASTODONPP_INSTANCE_HPP</span></div>
|
||||
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  [[nodiscard]]</div>
|
||||
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  answer_type <a class="code" href="classmastodonpp_1_1Instance_1_1ObtainToken.html#addda7f4e1ca4200235764707478f6d51">step_2</a>(string_view code);</div>
|
||||
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  </div>
|
||||
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <a class="code" href="classmastodonpp_1_1Instance.html#a04dc593589b69f9f71c4acecb39d995a">Instance</a> &_instance;</div>
|
||||
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> _baseuri;</div>
|
||||
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordtype">string</span> _scopes;</div>
|
||||
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordtype">string</span> _client_id;</div>
|
||||
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <span class="keywordtype">string</span> _client_secret;</div>
|
||||
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  };</div>
|
||||
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  </div>
|
||||
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> _hostname;</div>
|
||||
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> _baseuri;</div>
|
||||
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <span class="keywordtype">string</span> _access_token;</div>
|
||||
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  uint64_t _max_chars;</div>
|
||||
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="keywordtype">string</span> _proxy;</div>
|
||||
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  vector<string> _post_formats;</div>
|
||||
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keywordtype">string</span> _cainfo;</div>
|
||||
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keywordtype">string</span> _useragent;</div>
|
||||
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span> };</div>
|
||||
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  </div>
|
||||
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span> } <span class="comment">// namespace mastodonpp</span></div>
|
||||
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  </div>
|
||||
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span> <span class="preprocessor">#endif // MASTODONPP_INSTANCE_HPP</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="aclassmastodonpp_1_1Instance_1_1ObtainToken_html"><div class="ttname"><a href="classmastodonpp_1_1Instance_1_1ObtainToken.html">mastodonpp::Instance::ObtainToken</a></div><div class="ttdoc">Simplifies obtaining an OAuth 2.0 Bearer Access Token.</div><div class="ttdef"><b>Definition:</b> instance.hpp:236</div></div>
|
||||
<div class="ttc" id="aclassmastodonpp_1_1Instance_html_a4d594e1365584a05e5a16fc8aea76e9d"><div class="ttname"><a href="classmastodonpp_1_1Instance.html#a4d594e1365584a05e5a16fc8aea76e9d">mastodonpp::Instance::get_nodeinfo</a></div><div class="ttdeci">answer_type get_nodeinfo()</div><div class="ttdoc">Returns the NodeInfo of the instance.</div></div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user