-
Notifications
You must be signed in to change notification settings - Fork 0
/
installation.html
33 lines (29 loc) · 7.15 KB
/
installation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Apicase | Installation</title>
<meta name="description" content="">
<link rel="preload" href="/assets/css/14.styles.069008a2.css" as="style"><link rel="preload" href="/assets/js/app.d0011968.js" as="script"><link rel="preload" href="/assets/js/3.a7bbd215.js" as="script"><link rel="prefetch" href="/assets/js/6.d4447d10.js"><link rel="prefetch" href="/assets/js/0.a4bd400c.js"><link rel="prefetch" href="/assets/js/1.8bd08c19.js"><link rel="prefetch" href="/assets/js/2.274c5fac.js"><link rel="prefetch" href="/assets/js/4.93452041.js"><link rel="prefetch" href="/assets/js/5.948b7737.js"><link rel="prefetch" href="/assets/js/7.766f0896.js"><link rel="prefetch" href="/assets/js/8.ff9bda44.js"><link rel="prefetch" href="/assets/js/9.01782082.js"><link rel="prefetch" href="/assets/js/10.258050f9.js"><link rel="prefetch" href="/assets/js/11.5a6bed95.js"><link rel="prefetch" href="/assets/js/12.a5b71f84.js"><link rel="prefetch" href="/assets/js/13.646089ee.js">
<link rel="stylesheet" href="/assets/css/14.styles.069008a2.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div><a href="/" class="home-link router-link-active"><!----><span class="site-name">
Apicase
</span></a><div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""><!----></div><!----></div></header><div class="sidebar-mask"></div><div class="sidebar"><!----><ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading open"><span>Apicase</span><!----></p><ul class="sidebar-group-items"><li><a href="/" class="sidebar-link">Introduction</a></li><li><a href="/installation.html" class="active sidebar-link">Installation</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/installation.html#install-core-package" class="sidebar-link">Install core package</a></li><li class="sidebar-sub-header"><a href="/installation.html#install-adapters" class="sidebar-link">Install adapters</a></li><li class="sidebar-sub-header"><a href="/installation.html#usage" class="sidebar-link">Usage</a></li><li class="sidebar-sub-header"><a href="/installation.html#additional-packages" class="sidebar-link">Additional packages</a></li><li class="sidebar-sub-header"><a href="/installation.html#official-adapters" class="sidebar-link">Official adapters</a></li></ul></li><li><a href="/quick-start.html" class="sidebar-link">Quick start</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Anatomy</span><!----></p><ul class="sidebar-group-items"><li><a href="/anatomy/requests.html" class="sidebar-link">Requests</a></li><li><a href="/anatomy/services.html" class="sidebar-link">Services</a></li><li><a href="/anatomy/spawner.html" class="sidebar-link">Spawner API</a></li><li><a href="/anatomy/adapters.html" class="sidebar-link">Adapters</a></li></ul></div></li><li><div class="sidebar-group collapsable"><p class="sidebar-heading"><span>Adapters</span><span class="arrow right"></span></p><!----></div></li><li><div class="sidebar-group collapsable"><p class="sidebar-heading"><span>Migration info</span><span class="arrow right"></span></p><!----></div></li><li><div class="sidebar-group collapsable"><p class="sidebar-heading"><span>Deprecated APIs</span><span class="arrow right"></span></p><!----></div></li></ul></div><div class="page"><div class="content"><h1 id="installation"><a href="#installation" aria-hidden="true" class="header-anchor">#</a> Installation</h1><h2 id="install-core-package"><a href="#install-core-package" aria-hidden="true" class="header-anchor">#</a> Install core package</h2><pre class="language-bash"><code><span class="token function">npm</span> <span class="token function">install</span> @apicase/core
</code></pre><h2 id="install-adapters"><a href="#install-adapters" aria-hidden="true" class="header-anchor">#</a> Install adapters</h2><p>All official adapters are named as <code>@apicase/adapter-name</code></p><p>For example:</p><pre class="language-bash"><code><span class="token function">npm</span> <span class="token function">install</span> @apicase/adapter-fetch
</code></pre><h2 id="usage"><a href="#usage" aria-hidden="true" class="header-anchor">#</a> Usage</h2><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> apicase <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@apicase/core'</span>
<span class="token keyword">import</span> fetch <span class="token keyword">from</span> <span class="token string">'@apicase/adapter-fetch'</span>
<span class="token keyword">const</span> doFetchRequest <span class="token operator">=</span> <span class="token function">apicase</span><span class="token punctuation">(</span>fetch<span class="token punctuation">)</span>
<span class="token function">doFetchRequest</span><span class="token punctuation">(</span><span class="token punctuation">{</span> url<span class="token punctuation">:</span> <span class="token string">'/posts'</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
</code></pre><h2 id="additional-packages"><a href="#additional-packages" aria-hidden="true" class="header-anchor">#</a> Additional packages</h2><ul><li><a href="https://github.com/apicase/services" target="_blank" rel="noopener noreferrer"><strong>@apicase/services</strong></a> - powerful services to create smart and flexible API layer</li><li><a href="https://github.com/apicase/spawner" target="_blank" rel="noopener noreferrer"><strong>@apicase/spawner</strong></a> - painless control of your API requests flow</li></ul><h2 id="official-adapters"><a href="#official-adapters" aria-hidden="true" class="header-anchor">#</a> Official adapters</h2><ul><li><a href="https://github.com/apicase/adapter-fetch" title="fetch" target="_blank" rel="noopener noreferrer"><strong>fetch</strong></a></li><li><a href="https://github.com/apicase/adapter-xhr" title="XMLHttpRequest" target="_blank" rel="noopener noreferrer"><strong>XMLHttpRequest</strong></a></li></ul></div><!----><div class="content page-nav"><p class="inner"><span class="prev">
← <a href="/" class="prev router-link-active">
Introduction
</a></span><span class="next"><a href="/quick-start.html">
Quick start
</a> →
</span></p></div></div></div></div>
<script src="/assets/js/3.a7bbd215.js" defer></script><script src="/assets/js/app.d0011968.js" defer></script>
</body>
</html>