-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathreference-api.html
17 lines (17 loc) · 12.1 KB
/
reference-api.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!doctype html>
<html class="docs-version-current" lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-beta.15">
<title data-react-helmet="true">Reference | Functionland</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://functionland.github.io/reference-api"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Reference | Functionland"><meta data-react-helmet="true" name="description" content="The Fula API includes the following:"><meta data-react-helmet="true" property="og:description" content="The Fula API includes the following:"><link data-react-helmet="true" rel="icon" href="/img/favicon.webp"><link data-react-helmet="true" rel="canonical" href="https://functionland.github.io/reference-api"><link data-react-helmet="true" rel="alternate" href="https://functionland.github.io/reference-api" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://functionland.github.io/reference-api" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.550d40eb.css">
<link rel="preload" href="/assets/js/runtime~main.aa200fd9.js" as="script">
<link rel="preload" href="/assets/js/main.4e612618.js" as="script">
</head>
<body>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo.webp" alt="functionland logo" class="themedImage_W2Cr themedImage--light_TfLj"><img src="/img/logo.webp" alt="functionland logo" class="themedImage_W2Cr themedImage--dark_oUvU"></div><b class="navbar__title">Functionland</b></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/functionland" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></span></a><div class="toggle_Pssr toggle_TdHA toggleDisabled_jDku"><div class="toggleTrack_SSoT" role="button" tabindex="-1"><div class="toggleTrackCheck_XobZ"><span class="toggleIcon_eZtF">🌜</span></div><div class="toggleTrackX_YkSC"><span class="toggleIcon_eZtF">🌞</span></div><div class="toggleTrackThumb_uRm4"></div></div><input type="checkbox" class="toggleScreenReader_JnkT" aria-label="Switch between dark and light mode"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_P2Lg"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><aside class="theme-doc-sidebar-container docSidebarContainer_rKC_"><div class="sidebar_CW9Y"><nav class="menu thin-scrollbar menu_SkdO"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link hasHref_VCh3" href="/">Introduction</a><button aria-label="Toggle the collapsible sidebar category 'Introduction'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/getting-started-testnet">Getting Started with FxBlox</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link hasHref_VCh3" href="/functionyard">Functionyard Testnet</a><button aria-label="Toggle the collapsible sidebar category 'Functionyard Testnet'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link hasHref_VCh3" href="/pinning-service">Pinning Service API</a><button aria-label="Toggle the collapsible sidebar category 'Pinning Service API'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--active hasHref_VCh3" aria-current="page" href="/api-intro">Fula API</a><button aria-label="Toggle the collapsible sidebar category 'Fula API'" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link hasHref_VCh3" tabindex="0" href="/api/getting-started">Getting Started</a><button aria-label="Toggle the collapsible sidebar category 'Getting Started'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--active hasHref_VCh3" aria-current="page" tabindex="0" href="/reference-api">Reference</a><button aria-label="Toggle the collapsible sidebar category 'Reference'" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/api/client-instance">Client Instance</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/api/graph-api">Graph API</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/api/file-api">File API</a></li></ul></li></ul></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/whitepaper">Whitepaper</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link hasHref_VCh3" href="/RFCs/rfc-process">RFCs</a><button aria-label="Toggle the collapsible sidebar category 'RFCs'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link hasHref_VCh3" href="/blockchain/blockchain-intro">Blockchain</a><button aria-label="Toggle the collapsible sidebar category 'Blockchain'" type="button" class="clean-btn menu__caret"></button></div></li></ul></nav></div></aside><main class="docMainContainer_TCnq"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_DM6M"><div class="docItemContainer_vinB"><article><div class="tocCollapsible_jdIR theme-doc-toc-mobile tocMobile_TmEX"><button type="button" class="clean-btn tocCollapsibleButton_Fzxq">On this page</button></div><div class="theme-doc-markdown markdown"><h1>Fula API Reference</h1><p>The Fula API includes the following:</p><ul><li><p>a <a href="/api/graph-api">Graph API</a> for storing and querying structured data (JSON) over a graphql interface</p></li><li><p>a <a href="/api/file-api">File API</a> for uploading and retrieving files</p></li></ul><h2 class="anchor anchorWithStickyNavbar_mojV" id="typical-api-usage">Typical API Usage<a class="hash-link" href="#typical-api-usage" title="Direct link to heading"></a></h2><p>The <code>File</code> and <code>Graph</code> APIs can be used together to build many different types of DApps.</p><p>To better understand how they work together, here is an illustration of the basic flow you would use if you wanted to build your own photos DApp.</p><p>At a high level you will write a client that enables the user to upload a bunch of files and retrieve a list of the files so that they can be displayed in your DApp.</p><p>In order to do this you need to tell the <code>Graph</code> API where to store the collection of photos. You can give this collection any name you choose.</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="photo-upload">Photo Upload<a class="hash-link" href="#photo-upload" title="Direct link to heading"></a></h3><p align="center"><img alt="Photo-Upload" src="https://raw.githubusercontent.com/functionland/docs/246391d247fb301351e483594037135d2b3e03d3/static/diagrams/upload-photo.svg"></p><p align="center">Photo-Upload</p><p></p><h3 class="anchor anchorWithStickyNavbar_mojV" id="retrieve-photos-for-gallery">Retrieve Photos for Gallery<a class="hash-link" href="#retrieve-photos-for-gallery" title="Direct link to heading"></a></h3><p align="center"><img alt="Gallery-Retrieve" src="https://raw.githubusercontent.com/functionland/docs/246391d247fb301351e483594037135d2b3e03d3/static/diagrams/retrieve-photo.svg"></p><p align="center">Gallery-Retrieve</p><p></p><h2 class="anchor anchorWithStickyNavbar_mojV" id="under-the-covers">Under the Covers<a class="hash-link" href="#under-the-covers" title="Direct link to heading"></a></h2><p>To understand how the Fula client connects to a Box, it may help to understand what is going on under the covers.</p><p>The following Box <-> Client class diagram shows relationships and responsibilities for each component.</p><p><img alt="Client Box architecture" src="/assets/images/box-client-arch-7dbc18b37f68d0bed246a60c14d2caf4.png" width="6656" height="3143"></p></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/api/getting-started/using-samples"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Using Fula Samples</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/api/client-instance"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Client Instance</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_cNA8 thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#typical-api-usage" class="table-of-contents__link toc-highlight">Typical API Usage</a><ul><li><a href="#photo-upload" class="table-of-contents__link toc-highlight">Photo Upload</a></li><li><a href="#retrieve-photos-for-gallery" class="table-of-contents__link toc-highlight">Retrieve Photos for Gallery</a></li></ul></li><li><a href="#under-the-covers" class="table-of-contents__link toc-highlight">Under the Covers</a></li></ul></div></div></div></div></main></div></div></div>
<script src="/assets/js/runtime~main.aa200fd9.js"></script>
<script src="/assets/js/main.4e612618.js"></script>
</body>
</html>