Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New cache types #452

Closed
andrixnet opened this issue Feb 9, 2017 · 6 comments
Closed

New cache types #452

andrixnet opened this issue Feb 9, 2017 · 6 comments

Comments

@andrixnet
Copy link
Contributor

There will be new cache types according to opencaching/opencaching-pl#860

How should these be coordinated with OKAPI?

Also, how would changes as suggested here opencaching/opencaching-pl#860 (comment) affect OKAPI?

@wrygiel
Copy link
Member

wrygiel commented Feb 10, 2017

Internally OKAPI recognizes cache types by their IDs, not names. Externally it exposes names, which generally shouldn't change (especially the "primary ones"). So, we need a unique name-ID mapping. One that won't clash with the existing one:

            # Primary types (documented, cannot change)
            'Traditional' => 2, 'Multi' => 3, 'Quiz' => 7, 'Virtual' => 4,
            'Event' => 6,
            # Additional types (may get changed)
            'Other' => 1, 'Webcam' => 5,
            'Moving' => 8, 'Podcast' => 9, 'Own' => 10,

This means, that OCUS might be required to rewrite their cache type IDs, if any of these newly added ones have an ID which is <= 10.

@andrixnet
Copy link
Contributor Author

There are conflicting IDs. All IDs are documented here : https://wiki.opencaching.eu/index.php/Cache_types
A proposed non-overlapping ID assignment is described in column F

Second, does OKAPI expose type 7 (Quiz) in such way that apps like c:geo handle it as the same or different type then geocaching.com's Mystery type?

@wrygiel
Copy link
Member

wrygiel commented Feb 10, 2017

There are conflicting IDs. All IDs are documented here : https://wiki.opencaching.eu/index.php/Cache_types
A proposed non-overlapping ID assignment is described in column F

Once you come to an agreement then, these new IDs would need to be changed in OKAPI code.

Second, does OKAPI expose type 7 (Quiz) in such way that apps like c:geo handle it as the same or different type then geocaching.com's Mystery type?

I don't know how c:geo handles geocaching.com caches. (I myself don't use either c:geo, nor geocaching.com.)

What I can tell you is that OKAPI exposes quizes as Quiz cache type in services/caches/geocache method. Also Quiz is currently mapped to Unknown Cache in GPX files. I am not sure how groundspeak maps its Mystery caches to GPX currently, but OKAPI tries to be consistent with groundspeak in this matter (this has become difficult as groundspeak GPX files are now not available for regular users).

@wrygiel
Copy link
Member

wrygiel commented Feb 10, 2017

https://wiki.opencaching.eu/index.php/Cache_types

BTW - note, that you don't need to resolve duplicates with OCDE, because OCDE is not (currently?) planning to switch to OCPL code. OKAPI stores both mappings separately (one for OCPL-codebase and one for OCDE).

@following5
Copy link
Contributor

After old OC.UK shut down, there is only the conflicting ID 9 left within all OCPL-based sites. See PR #1752 for resolving that.

Between OCDE and OCPL branches, conflicts can only arize in data that is exported by the rarely used old "XML interface". That's the only interface that exposes the internal type IDs. We need not to care about that; it's up the the developers to remap those IDs.

So there is technically no problem with adding the special OC.US types.

@following5
Copy link
Contributor

But currently there are no efforts to add more types to the OCPL code. It has rather been suggested to map the OCUS types to common types. So there is nothing to do for OKAPI developers now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants