frappe/client.html

232 строки
9.0 KiB
HTML

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo Client &mdash; Frappe 2.1.4 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="top" title="Frappe 2.1.4 documentation" href="index.html"/>
<link rel="next" title="Performance" href="results.html"/>
<link rel="prev" title="RESTFul API" href="rest_api.html"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> Frappe</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation.html#dependencies">Dependencies</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#getting-started">Getting Started</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial for Developers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorial.html#make-a-filter">Make a filter</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial.html#overview-of-the-serving-system">Overview of the serving system</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="rest_api.html">RESTFul API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="rest_api.html#about">About</a></li>
<li class="toctree-l2"><a class="reference internal" href="rest_api.html#recommendation-api">Recommendation API</a></li>
<li class="toctree-l2"><a class="reference internal" href="rest_api.html#data-types">Data Types</a></li>
<li class="toctree-l2"><a class="reference internal" href="rest_api.html#request-recommendations">Request Recommendations</a></li>
<li class="toctree-l2"><a class="reference internal" href="rest_api.html#item-app-detail">Item/App Detail</a></li>
<li class="toctree-l2"><a class="reference internal" href="rest_api.html#user-items-api">User Items API</a></li>
<li class="toctree-l2"><a class="reference internal" href="rest_api.html#user-api">User API</a></li>
<li class="toctree-l2"><a class="reference internal" href="rest_api.html#health">Health</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Demo Client</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#getting-started">Getting Started</a></li>
<li class="toctree-l2"><a class="reference internal" href="#todo">TODO</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="results.html">Performance</a><ul>
<li class="toctree-l2"><a class="reference internal" href="results.html#response-times">Response Times</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#id1">2.1.3</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#id2">2.0.4</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#id3">2.0.2</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Frappe</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>Demo Client</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/client.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section" id="demo-client">
<span id="frappe-flient"></span><h1>Demo Client<a class="headerlink" href="#demo-client" title="Permalink to this headline"></a></h1>
<p>This is an implementation of a rest client for the recommendation system. It will list all users in your system and
provide a unique page for each with all the items the user possess and a list of recommended items for that user in
specific.</p>
<p>It is a html5/javascript app and you can use it in any modern browser. All the dependencies are in the same directory
as the client.html and everything is in the folder client in the project repository.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Because the client access resources from the machine some browsers like chrome will block it by default. If you
want to use the client with one of this browsers you have to manual allow cross origin request for file system.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This client was created to communicate to Mozilla Firefox OS marketplace. So the interface look that same icons
should appear with the items and some more info. With the Mozilla data those things happen.</p>
</div>
<div class="section" id="getting-started">
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h2>
<p>Go to /project/directory/client and open client.html with your browser (if you are using chrome you have to pass
&#8211;allow-file-access-from-files). The page open should have a textbox to introduce the webservice url.</p>
<p>In this stage you should have a frappe service up and running. If the server domain is <strong>example.net</strong>, the port where
it is serving is <strong>8080</strong> and you have configured the url mapping to the service has <strong>api</strong> you should introduce in the
textfield <strong>http://example.com:8080/api/</strong> and click go.</p>
<p>After you introduce the service url a list of the first 15 users in the database should appear in a table. The first
column is the id in the database for the user, the second the external_id and third the number of owned items.</p>
<p>By clicking in the external_id you should jump to a page with two sections. The first a list with owned items for that
user. The second a list of items recommended for that user. A refresh button is available to request for a new
recommendation.</p>
</div>
<div class="section" id="todo">
<h2>TODO<a class="headerlink" href="#todo" title="Permalink to this headline"></a></h2>
<p>In the next stage a functionality to acquire a new item and drop items.</p>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="results.html" class="btn btn-neutral float-right" title="Performance"/>Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="rest_api.html" class="btn btn-neutral" title="RESTFul API"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2013, Linas Baltrunas and João Baptista.
</p>
</div>
<a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.1.4',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>