TranscludeFilter
From ARK
Revision as of 16:42, 14 November 2013 by Stuarteve (talk | contribs) (Created page with "This method is used to return the results of a filter in a standard ARK results array. It can return the results of a saved filter or can be used to run a simple freetext search....")
This method is used to return the results of a filter in a standard ARK results array. It can return the results of a saved filter or can be used to run a simple freetext search.
Path
http://your.ark.instance/api.php?req=transcludeFilter
Arguments
- ftype - The filtertype. Currently only a free text search can be undertaken using the API. If you want to run a free text search ftype needs to be set to 'ftx'. You will also need to send a src.
- src - This is the free text phrase to search on. Normal Boolean Search (i.e. Google) parameters apply.
If you want to retrieve a previously saved filter (saved using the ARK web interface) use:
- retftrset - this needs to be set to the numeric id of a saved filter. Current saved filters can be queried using the API method describeFilters().
- disp_mode - this is the display mode of the filter results - how the HTML will be rendered. The possible options are: chat, table, text, thumb, map. If no disp_mode is specified the results will be returned in table view.
If anonymous logins are not enabled a username and password will need to be supplied:
- handle - username
- passwd - password
Example
Example 1 - getting a saved filter
Example return (returned as HTML):
<iframe> <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <head>
<title>leskernick - API</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="skins/arkologik/stylesheets/ark_main.css" type="text/css" rel="stylesheet" media="screen" /> <link href="/~stuarteve/leskernick//skins/arkologik/stylesheets/ark_main_print.css" type="text/css" rel="stylesheet" media="print" /> <link href="/~stuarteve/leskernick//skins/arkologik/stylesheets/lightbox.css" type="text/css" rel="stylesheet" /> <link href="/~stuarteve/leskernick//skins/arkologik/images/ark_favicon.ico" rel="shortcut icon" /> <script type="text/javascript" src="/~stuarteve/leskernick/lib/js/jquery.js"></script> <script type="text/javascript" src="/~stuarteve/leskernick/lib/js/php.js"></script> <script type="text/javascript" src="/~stuarteve/leskernick/lib/js/prototype.js"></script> <script type="text/javascript" src="/~stuarteve/leskernick/lib/js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="/~stuarteve/leskernick/js/js_functions.js"></script> <script type="text/javascript" src="/~stuarteve/leskernick/js/lightbox.js"></script> <script type="text/javascript" src="/~stuarteve/leskernick/js/livesearch.js"></script>
</head>
<body>
<a href="/~stuarteve/leskernick/api.php?sort_type=asc&sort_field=conf_field_hut_cd">Hut</a> | <a href="/~stuarteve/leskernick/api.php?sort_type=asc&sort_field=conf_field_description">Notes</a> | <a href="/~stuarteve/leskernick/api.php?sort_type=asc&sort_field=conf_field_direction">Door Direction</a> | <a href="/~stuarteve/leskernick/api.php?sort_type=asc&sort_field=conf_field_huts_can_see">Number of Huts that Can See this Hut</a> | <a href="/~stuarteve/leskernick/api.php?sort_type=asc&sort_field=conf_field_fcat">Type</a> | <a href="/~stuarteve/leskernick/api.php?sort_type=asc&sort_field=conf_field_stoneworlds">Stone Worlds </a> |
---|---|---|---|---|---|
<a href="/~stuarteve/leskernick/micro_view.php?item_key=hut_cd&hut_cd=LK12_28" class="itemkey_link" >LK12_28</a> | A shaman's house? The counterpart to house 3? | SW | 12 | House | <a href="/~stuarteve/leskernick/data/files/webthumb_12.jpg" rel="lightbox[]" ><img src="/~stuarteve/leskernick/data/files/arkthumb_12.jpg" alt="file_image"/></a> |
<a href="/~stuarteve/leskernick/micro_view.php?item_key=hut_cd&hut_cd=LK12_3" class="itemkey_link" >LK12_3</a> | The 'Shaman's House'. One of the most northerly and the only house with a view of Rough Tor directly through it's doorway. It is associated with a field-shrine/mini-tor to the south and has a small 'hidden' enclosure to the back of the house. SW says that it is hidden from all of the houses - although the viewshed analysis suggests otherwise... | W | 26 | <a href="/~stuarteve/leskernick/data/files/webthumb_4.jpg" rel="lightbox[]" ><img src="/~stuarteve/leskernick/data/files/arkthumb_4.jpg" alt="file_image"/></a> |
</div>
</body> </html>
</iframe>