megalodon/docs/globals.html
2020-04-02 22:20:46 +09:00

590 lines
35 KiB
HTML

<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>megalodon</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="assets/js/search.js" data-base=".">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="index.html" class="title">megalodon</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="globals.html">Globals</a>
</li>
</ul>
<h1>megalodon</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Namespaces</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-namespace"><a href="modules/entity.html" class="tsd-kind-icon">Entity</a></li>
<li class="tsd-kind-namespace"><a href="modules/mastodonapi.html" class="tsd-kind-icon">MastodonAPI</a></li>
<li class="tsd-kind-namespace"><a href="modules/mastodonentity.html" class="tsd-kind-icon">Mastodon<wbr>Entity</a></li>
<li class="tsd-kind-namespace"><a href="modules/misskeyapi.html" class="tsd-kind-icon">MisskeyAPI</a></li>
<li class="tsd-kind-namespace"><a href="modules/misskeyentity.html" class="tsd-kind-icon">Misskey<wbr>Entity</a></li>
<li class="tsd-kind-namespace"><a href="modules/oauth.html" class="tsd-kind-icon">OAuth</a></li>
<li class="tsd-kind-namespace"><a href="modules/pleromaapi.html" class="tsd-kind-icon">PleromaAPI</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Enumerations</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-enum"><a href="enums/notificationtype.html" class="tsd-kind-icon">Notification<wbr>Type</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Classes</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-class"><a href="classes/argumenterror.html" class="tsd-kind-icon">Argument<wbr>Error</a></li>
<li class="tsd-kind-class"><a href="classes/mastodon.html" class="tsd-kind-icon">Mastodon</a></li>
<li class="tsd-kind-class"><a href="classes/misskey.html" class="tsd-kind-icon">Misskey</a></li>
<li class="tsd-kind-class"><a href="classes/noimplementederror.html" class="tsd-kind-icon">No<wbr>Implemented<wbr>Error</a></li>
<li class="tsd-kind-class"><a href="classes/parser.html" class="tsd-kind-icon">Parser</a></li>
<li class="tsd-kind-class"><a href="classes/pleroma.html" class="tsd-kind-icon">Pleroma</a></li>
<li class="tsd-kind-class"><a href="classes/proxyprotocolerror.html" class="tsd-kind-icon">Proxy<wbr>Protocol<wbr>Error</a></li>
<li class="tsd-kind-class"><a href="classes/requestcancelederror.html" class="tsd-kind-icon">Request<wbr>Canceled<wbr>Error</a></li>
<li class="tsd-kind-class"><a href="classes/streamlistener.html" class="tsd-kind-icon">Stream<wbr>Listener</a></li>
<li class="tsd-kind-class"><a href="classes/streamlistenererror.html" class="tsd-kind-icon">Stream<wbr>Listener<wbr>Error</a></li>
<li class="tsd-kind-class"><a href="classes/unexpectederror.html" class="tsd-kind-icon">Unexpected<wbr>Error</a></li>
<li class="tsd-kind-class"><a href="classes/websocket.html" class="tsd-kind-icon">Web<wbr>Socket</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Interfaces</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-interface"><a href="interfaces/megalodoninterface.html" class="tsd-kind-icon">Megalodon<wbr>Interface</a></li>
<li class="tsd-kind-interface"><a href="interfaces/streamlistenerinterface.html" class="tsd-kind-icon">Stream<wbr>Listener<wbr>Interface</a></li>
<li class="tsd-kind-interface"><a href="interfaces/websocketinterface.html" class="tsd-kind-icon">Web<wbr>Socket<wbr>Interface</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Type aliases</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-type-alias"><a href="globals.html#instance" class="tsd-kind-icon">Instance</a></li>
<li class="tsd-kind-type-alias"><a href="globals.html#proxyconfig" class="tsd-kind-icon">Proxy<wbr>Config</a></li>
<li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#response" class="tsd-kind-icon">Response</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Variables</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-variable"><a href="globals.html#default_scope" class="tsd-kind-icon">DEFAULT_<wbr>SCOPE</a></li>
<li class="tsd-kind-variable"><a href="globals.html#default_ua" class="tsd-kind-icon">DEFAULT_<wbr>UA</a></li>
<li class="tsd-kind-variable"><a href="globals.html#no_redirect" class="tsd-kind-icon">NO_<wbr>REDIRECT</a></li>
<li class="tsd-kind-variable"><a href="globals.html#status_codes_to_abort_on" class="tsd-kind-icon">STATUS_<wbr>CODES_<wbr>TO_<wbr>ABORT_<wbr>ON</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Functions</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-function"><a href="globals.html#detector" class="tsd-kind-icon">detector</a></li>
<li class="tsd-kind-function"><a href="globals.html#generator" class="tsd-kind-icon">generator</a></li>
<li class="tsd-kind-function"><a href="globals.html#iscancel" class="tsd-kind-icon">is<wbr>Cancel</a></li>
<li class="tsd-kind-function"><a href="globals.html#proxyagent" class="tsd-kind-icon">proxy<wbr>Agent</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Type aliases</h2>
<section class="tsd-panel tsd-member tsd-kind-type-alias">
<a name="instance" class="tsd-anchor"></a>
<h3>Instance</h3>
<div class="tsd-signature tsd-kind-icon">Instance<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>title<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>uri<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>urls<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>streaming_api<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>version<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/megalodon.ts#L1232">src/megalodon.ts:1232</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5>title<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5>
</li>
<li class="tsd-parameter">
<h5>uri<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5>
</li>
<li class="tsd-parameter">
<h5>urls<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>streaming_api<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></h5>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5>streaming_<wbr>api<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5>
</li>
</ul>
</li>
<li class="tsd-parameter">
<h5>version<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5>
</li>
</ul>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-type-alias">
<a name="proxyconfig" class="tsd-anchor"></a>
<h3>Proxy<wbr>Config</h3>
<div class="tsd-signature tsd-kind-icon">Proxy<wbr>Config<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>auth<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>password<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>username<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>host<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>port<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>protocol<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"http"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"https"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks4"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks4a"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks5"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks5h"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks"</span><span class="tsd-signature-symbol"> }</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/proxy_config.ts#L4">src/proxy_config.ts:4</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5><span class="tsd-flag ts-flagOptional">Optional</span> auth<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>password<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>username<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></h5>
</li>
<li class="tsd-parameter">
<h5>host<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5>
</li>
<li class="tsd-parameter">
<h5>port<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5>
</li>
<li class="tsd-parameter">
<h5>protocol<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"http"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"https"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks4"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks4a"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks5"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks5h"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"socks"</span></h5>
</li>
</ul>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter">
<a name="response" class="tsd-anchor"></a>
<h3>Response</h3>
<div class="tsd-signature tsd-kind-icon">Response&lt;T&gt;<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">; </span>headers<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>statusText<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/response.ts#L1">src/response.ts:1</a></li>
</ul>
</aside>
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<ul class="tsd-type-parameters">
<li>
<h4>T</h4>
</li>
</ul>
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></h5>
</li>
<li class="tsd-parameter">
<h5>headers<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></h5>
</li>
<li class="tsd-parameter">
<h5>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5>
</li>
<li class="tsd-parameter">
<h5>status<wbr>Text<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5>
</li>
</ul>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Variables</h2>
<section class="tsd-panel tsd-member tsd-kind-variable">
<a name="default_scope" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> DEFAULT_<wbr>SCOPE</h3>
<div class="tsd-signature tsd-kind-icon">DEFAULT_<wbr>SCOPE<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = [&#x27;read&#x27;, &#x27;write&#x27;, &#x27;follow&#x27;]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/default.ts#L2">src/default.ts:2</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable">
<a name="default_ua" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> DEFAULT_<wbr>UA</h3>
<div class="tsd-signature tsd-kind-icon">DEFAULT_<wbr>UA<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"megalodon"</span><span class="tsd-signature-symbol"> = &quot;megalodon&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/default.ts#L3">src/default.ts:3</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable">
<a name="no_redirect" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> NO_<wbr>REDIRECT</h3>
<div class="tsd-signature tsd-kind-icon">NO_<wbr>REDIRECT<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"urn:ietf:wg:oauth:2.0:oob"</span><span class="tsd-signature-symbol"> = &quot;urn:ietf:wg:oauth:2.0:oob&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/default.ts#L1">src/default.ts:1</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable">
<a name="status_codes_to_abort_on" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> STATUS_<wbr>CODES_<wbr>TO_<wbr>ABORT_<wbr>ON</h3>
<div class="tsd-signature tsd-kind-icon">STATUS_<wbr>CODES_<wbr>TO_<wbr>ABORT_<wbr>ON<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = [400, 401, 403, 404, 406, 410, 422]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/mastodon/stream_listener.ts#L10">src/mastodon/stream_listener.ts:10</a></li>
</ul>
</aside>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Functions</h2>
<section class="tsd-panel tsd-member tsd-kind-function">
<a name="detector" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> detector</h3>
<ul class="tsd-signatures tsd-kind-function">
<li class="tsd-signature tsd-kind-icon">detector<span class="tsd-signature-symbol">(</span>url<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, proxyConfig<span class="tsd-signature-symbol">?: </span><a href="globals.html#proxyconfig" class="tsd-signature-type">ProxyConfig</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">"mastodon"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"pleroma"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"misskey"</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/megalodon.ts#L1249">src/megalodon.ts:1249</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Detect SNS type.
Now support Mastodon, Pleroma and Pixelfed.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>url: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Base URL of SNS.</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> proxyConfig: <a href="globals.html#proxyconfig" class="tsd-signature-type">ProxyConfig</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> = false</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Proxy setting, or set false if don&#39;t use proxy.</p>
</div>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">"mastodon"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"pleroma"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"misskey"</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>SNS name.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function">
<a name="generator" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> generator</h3>
<ul class="tsd-signatures tsd-kind-function">
<li class="tsd-signature tsd-kind-icon">generator<span class="tsd-signature-symbol">(</span>sns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"mastodon"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"pleroma"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"misskey"</span>, baseUrl<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, accessToken<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span>, userAgent<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span>, proxyConfig<span class="tsd-signature-symbol">?: </span><a href="globals.html#proxyconfig" class="tsd-signature-type">ProxyConfig</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="interfaces/megalodoninterface.html" class="tsd-signature-type">MegalodonInterface</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/megalodon.ts#L1279">src/megalodon.ts:1279</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get client for each SNS according to megalodon interface.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>sns: <span class="tsd-signature-type">"mastodon"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"pleroma"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"misskey"</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Name of your SNS, <code>mastodon</code> or <code>pleroma</code>.</p>
</div>
</div>
</li>
<li>
<h5>baseUrl: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>hostname or base URL.</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> accessToken: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> = null</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>access token from OAuth2 authorization</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> userAgent: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> = null</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>UserAgent is specified in header on request.</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> proxyConfig: <a href="globals.html#proxyconfig" class="tsd-signature-type">ProxyConfig</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> = false</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Proxy setting, or set false if don&#39;t use proxy.</p>
</div>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="interfaces/megalodoninterface.html" class="tsd-signature-type">MegalodonInterface</a></h4>
<p>Client instance for each SNS you specified.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function">
<a name="iscancel" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> is<wbr>Cancel</h3>
<ul class="tsd-signatures tsd-kind-function">
<li class="tsd-signature tsd-kind-icon">is<wbr>Cancel<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/cancel.ts#L11">src/cancel.ts:11</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>value: <span class="tsd-signature-type">any</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function">
<a name="proxyagent" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> proxy<wbr>Agent</h3>
<ul class="tsd-signatures tsd-kind-function">
<li class="tsd-signature tsd-kind-icon">proxy<wbr>Agent<span class="tsd-signature-symbol">(</span>proxyConfig<span class="tsd-signature-symbol">: </span><a href="globals.html#proxyconfig" class="tsd-signature-type">ProxyConfig</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpsProxyAgent</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">SocksProxyAgent</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/h3poteto/megalodon/blob/631cff7/src/proxy_config.ts#L16">src/proxy_config.ts:16</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>proxyConfig: <a href="globals.html#proxyconfig" class="tsd-signature-type">ProxyConfig</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">HttpsProxyAgent</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">SocksProxyAgent</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals current ">
<a href="globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/entity.html">Entity</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mastodonapi.html">MastodonAPI</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mastodonentity.html">Mastodon<wbr>Entity</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/misskeyapi.html">MisskeyAPI</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/misskeyentity.html">Misskey<wbr>Entity</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/oauth.html">OAuth</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/pleromaapi.html">PleromaAPI</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-enum">
<a href="enums/notificationtype.html" class="tsd-kind-icon">Notification<wbr>Type</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/argumenterror.html" class="tsd-kind-icon">Argument<wbr>Error</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/mastodon.html" class="tsd-kind-icon">Mastodon</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/misskey.html" class="tsd-kind-icon">Misskey</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/noimplementederror.html" class="tsd-kind-icon">No<wbr>Implemented<wbr>Error</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/parser.html" class="tsd-kind-icon">Parser</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/pleroma.html" class="tsd-kind-icon">Pleroma</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/proxyprotocolerror.html" class="tsd-kind-icon">Proxy<wbr>Protocol<wbr>Error</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/requestcancelederror.html" class="tsd-kind-icon">Request<wbr>Canceled<wbr>Error</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/streamlistener.html" class="tsd-kind-icon">Stream<wbr>Listener</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/streamlistenererror.html" class="tsd-kind-icon">Stream<wbr>Listener<wbr>Error</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/unexpectederror.html" class="tsd-kind-icon">Unexpected<wbr>Error</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/websocket.html" class="tsd-kind-icon">Web<wbr>Socket</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/megalodoninterface.html" class="tsd-kind-icon">Megalodon<wbr>Interface</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/streamlistenerinterface.html" class="tsd-kind-icon">Stream<wbr>Listener<wbr>Interface</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/websocketinterface.html" class="tsd-kind-icon">Web<wbr>Socket<wbr>Interface</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="globals.html#instance" class="tsd-kind-icon">Instance</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="globals.html#proxyconfig" class="tsd-kind-icon">Proxy<wbr>Config</a>
</li>
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
<a href="globals.html#response" class="tsd-kind-icon">Response</a>
</li>
<li class=" tsd-kind-variable">
<a href="globals.html#default_scope" class="tsd-kind-icon">DEFAULT_<wbr>SCOPE</a>
</li>
<li class=" tsd-kind-variable">
<a href="globals.html#default_ua" class="tsd-kind-icon">DEFAULT_<wbr>UA</a>
</li>
<li class=" tsd-kind-variable">
<a href="globals.html#no_redirect" class="tsd-kind-icon">NO_<wbr>REDIRECT</a>
</li>
<li class=" tsd-kind-variable">
<a href="globals.html#status_codes_to_abort_on" class="tsd-kind-icon">STATUS_<wbr>CODES_<wbr>TO_<wbr>ABORT_<wbr>ON</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#detector" class="tsd-kind-icon">detector</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#generator" class="tsd-kind-icon">generator</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#iscancel" class="tsd-kind-icon">is<wbr>Cancel</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#proxyagent" class="tsd-kind-icon">proxy<wbr>Agent</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="assets/js/search.js"><' + '/script>');</script>
</body>
</html>