38 lines
No EOL
3.5 KiB
HTML
38 lines
No EOL
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Python: module backend</title>
|
|
</head><body>
|
|
|
|
<table class="heading">
|
|
<tr class="heading-text decor">
|
|
<td class="title"> <br><strong class="title">backend</strong></td>
|
|
<table class="section">
|
|
<tr class="decor functions-decor heading-text">
|
|
<td class="section-title" colspan=3> <br><strong class="bigsection">Functions</strong></td></tr>
|
|
|
|
<tr><td class="decor functions-decor"><span class="code"> </span></td><td> </td>
|
|
<td class="singlecolumn"><dl><dt><a name="-fetchItem"><strong>fetchItem</strong></a>(store)</dt><dd><span class="code">Fetch an item from given store that matches request arguments</span></dd></dl>
|
|
<dl><dt><a name="-fetchItems"><strong>fetchItems</strong></a>(store)</dt><dd><span class="code">Fetch all items from a given store</span></dd></dl>
|
|
<dl><dt><a name="-fetchStore"><strong>fetchStore</strong></a>(key=None)</dt><dd><span class="code">Fetch a store with the given key. If no key is provided, fetch store based on location data in request arguments</span></dd></dl>
|
|
<dl><dt><a name="-get"><strong>get</strong></a>()</dt><dd><span class="code">Returns store based on request arguments. If no arguments are provided, returns all stores in database</span></dd></dl>
|
|
<dl><dt><a name="-getImage"><strong>getImage</strong></a>()</dt><dd><span class="code">Returns store image based on image key provided in request arguments</span></dd></dl>
|
|
<dl><dt><a name="-post"><strong>post</strong></a>()</dt><dd><span class="code">Adds a store or item to the database depending on request arguments</span></dd></dl>
|
|
<dl><dt><a name="-put"><strong>put</strong></a>()</dt><dd><span class="code">Updates item or store picture depending on request arguments</span></dd></dl>
|
|
<dl><dt><a name="-search"><strong>search</strong></a>()</dt><dd><span class="code">Returns items matching query string in searchable radius (currently 50mi/80km)</span></dd></dl>
|
|
<dl><dt><a name="-updateCheapest"><strong>updateCheapest</strong></a>(item, store)</dt><dd><span class="code">Compare price of current item to other items in the given store and update store's cheapest item if this item is cheaper than the others</span></dd></dl>
|
|
</td></tr></table><p>
|
|
<table class="section">
|
|
<tr class="decor data-decor heading-text">
|
|
<td class="section-title" colspan=3> <br><strong class="bigsection">Data</strong></td></tr>
|
|
|
|
<tr><td class="decor data-decor"><span class="code"> </span></td><td> </td>
|
|
<td class="singlecolumn"><strong>RADIUS</strong> = 80000<br>
|
|
<strong>app</strong> = <Flask 'backend'><br>
|
|
<strong>deta</strong> = <deta.Deta object><br>
|
|
<strong>drive</strong> = <deta.drive._Drive object><br>
|
|
<strong>itemsDB</strong> = <deta.base._Base object><br>
|
|
<strong>request</strong> = <LocalProxy unbound><br>
|
|
<strong>storesDB</strong> = <deta.base._Base object></td></tr></table>
|
|
</body></html> |