Files
oc-server3/htdocs/okapi/services/caches/geocaches.xml
2014-10-08 10:06:07 +02:00

54 lines
2.5 KiB
XML

<xml>
<brief>Retrieve information on multiple geocaches</brief>
<issue-id>20</issue-id>
<desc>
<p>This method works like the services/caches/geocache method, but works
with multiple geocaches (instead of only one).</p>
</desc>
<req name='cache_codes'>
<p>Pipe-separated list of cache cache codes. These represent the
geocaches you are interested in. No more than 500 codes are allowed.
Unlike in the "geocache" method, this CAN be an empty string (it will
result in an empty, but valid, response).</p>
</req>
<opt name='langpref' default='en'>
<p>Pipe-separated list of ISO 639-1 language codes. This indicates the
order of preference in which language will be chosen for fields like
<b>name</b> and <b>description</b>.</p>
<p>Please note, that you may also access caches' descriptions in all
available languages. If you want to do this, you should use fields
<b>names</b>, <b>descriptions</b> (etc.) instead of <b>name</b> and
<b>description</b> (etc.).</p>
</opt>
<opt name='fields' default='code|name|location|type|status'>
<p>Same as in the services/caches/geocache method. Pipe-separated list
of field names which you are interested with.
See services/caches/geocache method for a list available values.</p>
</opt>
<opt name='attribution_append' default='full'>
<p>Same as in the services/caches/geocache method.</p>
</opt>
<opt name='lpc' default='10'>
Same as in the services/caches/geocache method.
</opt>
<opt name='log_fields' default='uuid|date|user|type|comment'>
Same as in the services/caches/geocache method.
</opt>
<opt name='my_location'>
Same as in the services/caches/geocache method.
</opt>
<opt name='user_uuid'>
Same as in the services/caches/geocache method.
</opt>
<common-format-params/>
<returns>
<p>A dictionary. Cache codes you provide will be mapped to dictionary keys,
and each value will be a dictionary of fields you have selected.</p>
<p>For example, for <i>geocaches?cache_codes=OP3D96|OC124&amp;fields=type</i>
query, the result might look something link this:</p>
<pre>{"OP3D96": {"type": "Traditional"}, "OC124": null}</pre>
<p>Value of <b>null</b> means that the given cache haven't been found.
(This behavior is different than in the services/caches/geocache method, which
responds with an HTTP 400 error in such case.)</p>
</returns>
</xml>