|
475 | 475 | <div class='issue-comments' issue_id='117'></div>
|
476 | 476 |
|
477 | 477 |
|
478 |
| -<h2 id='oc-branch-differences'>Differences between OCPL and OCDE branches</h2> |
| 478 | +<h2>Differences between Opencaching installations</h2> |
479 | 479 |
|
480 |
| -<p>Client developers should be aware that the are two primary Opencaching |
481 |
| -codebase branches. Some Opencaching installations are running the OCPL branch, |
482 |
| -some other are running the OCDE branch. (You can read more about this |
483 |
| -<a href='https://github.com/opencaching/opencaching-pl/wiki#brief-introduction-in-english'>here</a>.)</p> |
| 480 | +<p>Client developers should be aware that Opencaching sites provide different |
| 481 | +sets of features. E.g. Opencaching.US currently does not support OKAPI log |
| 482 | +image upload, and there is no geocache rating system at Opencaching.DE. |
| 483 | +OKAPI implements several mechanisms that either hide those differences - |
| 484 | +you don't need to care about them - or allows your application to automatically |
| 485 | +adjust to the Opencaching site's capabilities.</p> |
484 | 486 |
|
485 |
| -<p>In general, <b>OKAPI supports both of these branches via exactly the same |
486 |
| -API interface</b>, so you don't have to worry about the internal differences. |
487 |
| -However, you should be aware of the fact, that some things work a bit different |
488 |
| -on one branch, than they on the other. (Like, for example, OCDE doesn't have a |
489 |
| -cache rating system, so whenever you ask for the <b>rating</b> field of a |
490 |
| -geocache, you will get <b>null</b>.)</p> |
| 487 | +<h3>OKAPI versions</h3> |
491 | 488 |
|
492 |
| -<p>In order for you to easily notice methods, parameters and fields which are |
493 |
| -specific to only a single of these branches, we display the following "tags" in |
494 |
| -many places:</p> |
| 489 | +<p>Now and then, new features are added to OKAPI. They will be listed in the |
| 490 | +<a href="changelog.html">Changelog</a>, including version numbers. By comparing |
| 491 | +those numbers to the installation's current OKAPI version number, as returned by the |
| 492 | +<a href='%OKAPI:methodargref:services/apisrv/installation%'>services/apisrv/installation</a> |
| 493 | +method, applications can detect if a new feature is available.</p> |
| 494 | + |
| 495 | +<h3 id='site-capabilities'>Site capabilities</h3> |
| 496 | + |
| 497 | +<p>OKAPI methods generally are designed to abstract from differences between OC |
| 498 | +installations. E.g. if some geocache or log property is not implemented, OKAPI |
| 499 | +will return <i>null</i> or <i>false</i> (as explained in the method docs). |
| 500 | +When submitting data, unsupported options are mostly ignored (as documented), |
| 501 | +or OKAPI will return an HTTP 200 result with the <i>success</i>=<i>false</i> |
| 502 | +field and a user-friendly explanation (as documented).</p> |
| 503 | + |
| 504 | +<p>However, when searching for caches or submitting content, there are a few |
| 505 | +exceptions where this can't be done. The docs then will refer to one of the |
| 506 | +following methods, that your application can call to find out what features |
| 507 | +are available:</p> |
495 | 508 |
|
496 | 509 | <ul>
|
497 |
| - <li><span class='infotag infotag-ocpl-specific'>OCPL</span> - indicates |
498 |
| - that a certain method, parameter or field was designed specificly for |
499 |
| - OCPL-based Opencaching sites,</li> |
| 510 | + <li><a href='services/attrs/attribute_index.html'>services/attrs/attribute_index</a> |
| 511 | + - list of available cache attributes,</li> |
| 512 | + <li><a href='services/caches/capabilities.html'>services/caches/capabilities</a> |
| 513 | + - geocache capabilities,</li> |
| 514 | + <li><a href='services/logs/capabilities.html'>services/logs/capabilities</a> |
| 515 | + - logging capabilities, including the submission of cache |
| 516 | + recommendations and ratings.</li> |
| 517 | +</ul> |
| 518 | + |
| 519 | +<p>This methods also return additional information, that allows to hide |
| 520 | +nonfunctional features from user interfaces. E.g. you may want to disable |
| 521 | +searching for geocaches by rating, if OKAPI will ignore the user's input |
| 522 | +(because the OC site does not implement rating).</p> |
| 523 | + |
| 524 | +<h3></h3> |
| 525 | + |
| 526 | +<h3 id='oc-branch-differences'>Branch tags</h3> |
500 | 527 |
|
501 |
| - <li><span class='infotag infotag-ocde-specific'>OCDE</span> - indicates |
502 |
| - that a certain method, parameter or field was designed specificly for |
503 |
| - OCDE-based Opencaching sites.</li> |
| 528 | +<p>Throughout the OKAPI documentation, you will encounter options and fields |
| 529 | +that are tagged as "OCPL" or "OCDE". These tags have the following meaning:</p> |
| 530 | + |
| 531 | +<ul> |
| 532 | + <li> |
| 533 | + <span class='infotag infotag-ocde-specific'>OCDE</span> - This feature |
| 534 | + currently is only in use at Opencaching sites that are based on the |
| 535 | + OCDE software branch (currently Opencaching.DE/IT/FR). If your |
| 536 | + application is NOT intended to be used with those sites, you may want |
| 537 | + to skip this feature and not implement it. |
| 538 | + </li> |
| 539 | + <li> |
| 540 | + <span class='infotag infotag-ocpl-specific'>OCPL</span> - This feature |
| 541 | + currently is only in use at Opencaching sites that are based on the |
| 542 | + OCPL software branch (currently Opencaching.PL, NL, US, UK, RO). If |
| 543 | + your application is NOT intended to be used with those sites, you |
| 544 | + may want to skip this feature and not implement it. |
| 545 | + </li> |
504 | 546 | </ul>
|
505 | 547 |
|
506 |
| -<p>Please note, that <b>you still MAY use all such "marked" methods, parameters |
507 |
| -and fields on ALL OKAPI sites.</b> Our methods are designed in such a way that, |
508 |
| -even if they are not supported by the underlying Opencaching site, they still |
509 |
| -won't throw errors, etc. At worst, they will "fail silently", or return empty |
510 |
| -results. All these differences should be described in detail in the |
511 |
| -documentation of the affected methods, parameters and fields.</p> |
| 548 | +<p>In all other cases, you are recommended to ignore the branch tags. See above |
| 549 | +for more information on differences between Opencaching sites.</p> |
512 | 550 |
|
513 | 551 | <p>If you have any questions about this, then ask them
|
514 | 552 | <a href="https://github.com/opencaching/okapi/issues/463">here</a>.</p>
|
|
0 commit comments