Opencaching.de

Opencaching International => Public discussion => Thema gestartet von: wrygiel am 06. Juni 2012, 12:06:12

Titel: API for OpenCaching.DE (and other sites)
Beitrag von: wrygiel am 06. Juni 2012, 12:06:12
This topic is for developers, but not only to OpenCaching.DE developers,
but also all other programmers interested in having an API for OpenCaching.DE.
That's why I am posting it in the public section.

Some OC sites already have public APIs, I am a developer on one of them,
maybe some of you have already stumbled upon it:

http://opencaching.pl/okapi/

The same API is installed also at opencaching.us and opencaching.org.uk.
It is also compatible with opencaching.de, but not yet installed there.
But I hope it will be - OC.DE admins keep saying that they will do it "soon" ;)

Anyway, I would like to hear your comments about my project! :)

Would you use it? What would you like to change in it (based on what you
can see at opencaching.pl)? Or, perhaps, you'd like an additional client library
for Java (Android) or PHP included?

Thanks for any suggestions!

PS. OKAPI is open-source (http://code.google.com/p/opencaching-api/) and we have a bugtracker (http://code.google.com/p/opencaching-api/issues/list) at google code which
you can also use if you prefer that over forum.
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: dl6hbo am 06. Juni 2012, 15:46:58
Hi wrygiel,
at opencaching.de we are currently in the process of founding the German equivalent of a non-profit organization, as a carrier for our future activities.  Please let us have all the time we need to do so.   Once the task is finished, our developers will sure be happy to contact you and talk shop.

Regards,
Rainer
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: wrygiel am 06. Juni 2012, 16:08:35
Hello dl6hbo,

Yes, I've heard about your issues (I've been writing with some of you for some time).
I hope it all goes well :)

I am simply looking forward to hearing some comments of other developers from Germany
potentially interested in OKAPI. (For example, what kind of data do they scrape of the website
and would like API to include.)
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: dl6hbo am 06. Juni 2012, 17:02:06
Hi wrygiel,

thanks for your reply.  Yes I do as well hope all goes well. Keep your fingers crossed !
 :)
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: harrieklomp am 06. Juni 2012, 20:14:46
Also oc.nl has to wait for oc.de and also we do not know what changes there will be made.
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: wrygiel am 06. Juni 2012, 20:24:30
Also oc.nl has to wait for oc.de

Maybe it's a stupid question, but - why?

I don't know much about "relationships" between OC nodes, but I always though them to be completely independant servers with their own code.

For example, half a year ago I wrote to admins at OC.US and OC.ORG.UK and they have installed OKAPI without much problems. Even though they do not run on the same code as OC.PL (they have a very similar database though).
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: harrieklomp am 06. Juni 2012, 20:40:49


Maybe it's a stupid question, but - why?

I don't know much about "relationships" between OC nodes, but I always though them to be completely independant servers with their own code.

For example, half a year ago I wrote to admins at OC.US and OC.ORG.UK and they have installed OKAPI without much problems. Even though they do not run on the same code as OC.PL (they have a very similar database though).

We have the same code as oc.de but only the language has been translated and some minor things in some files.
In this case it was supposed that when there is a update all sites like oc.es, oc.it and oc.nl can updated in one go.
I am the only one left with very little knowledge about the site, i am not a programmer or developer, so i am depending from the friends from Germany for help if i need it  :D
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: wrygiel am 06. Juni 2012, 21:43:05
If you'd allow me, I would like to have a look at your server. I won't change anything "visible", I would just test for OKAPI compatibility and report the results later. Could you write me at rygielski@mimuw.edu.pl?

Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: michasch am 07. Juni 2012, 16:06:21
If I remember correctly, there are two main issues (three if you count the currently ongoing change of operator) preventing the OCAPI to be used at OC.de:
- first the PHP version is currently too low on our server - we're in progress doing an upgrade of all the servers software, but changing operator of the site got more priority.
- second there is some additional business logic compared to OC.pl node. In germany an additional status "locked, hidden" is present mainly used in case of legal difficulties (and some minor other differences). Those caches MUSTN'T be available via API under all circumstances, as you may easily understand.
Because of your API accessing the database directly and not by using our php-business logic the API must be carefully reviewed so there is no possibility to do things or to see caches or other information not available at the website.

Best regards,
Michael
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: wrygiel am 07. Juni 2012, 17:05:00
Hi michasch,

As to the second problem - this doesn't seem much of a problem, we'll make OKAPI ignore database entries with unknown statuses. We'll deal with all such issues when you'll have your new server ready. This shouldn't be hard.

Maybe you'd be interested in running a beta-test on opencaching.nl?
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: wrygiel am 10. Juni 2012, 11:32:57
Hello again,

I would like to inform you that I made OKAPI compatible with OCNL code
(and hence, OCDE code too, I guess). Here is a full report on the differences
I found and fixed:

http://code.google.com/p/opencaching-api/wiki/opencaching_nl

I also set up a beta vesion of OKAPI on OpenCaching.NL server.
I think OKAPI is now compatible with all OC nodes.
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: wrygiel am 10. Juni 2012, 13:29:46
In germany an additional status "locked, hidden" is present mainly used in case of legal difficulties (and some minor other differences). Those caches MUSTN'T be available via API

I think this part of the code is the same as in OCPL. OCPL has six statuses (1-6), only the the first three (1-3) can be displayed (and only 1-3 can be accessed via OKAPI). You have more of them?
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: following am 10. Juni 2012, 19:20:22
I think this part of the code is the same as in OCPL. OCPL has six statuses (1-6), only the the first three (1-3) can be displayed (and only 1-3 can be accessed via OKAPI). You have more of them?

Yes, there is state 7 = locked & invisible.
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: mic@ am 16. August 2012, 21:41:09
Zitat von: wrygiel
Some OC sites already have public APIs, I am a developer on one of them,
maybe some of you have already stumbled upon it:

http://opencaching.pl/okapi

Where do I find the terms of service?
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: Schrottie am 16. August 2012, 23:39:56
Where do I find the terms of service?

http://opencaching.pl/okapi/signup.html
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: wrygiel am 17. August 2012, 10:24:53
Where do I find the terms of service?

http://opencaching.pl/okapi/signup.html

Note, that the terms of service ARE NOT part of OKAPI. These are provided by OC node itself. In other words, terms of service for OKAPI installed on OCDE may differ. Currently all other OC nodes chose to simply copy OCPL's terms of service contents.
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: mic@ am 17. August 2012, 10:29:55
@wrygiel: It´s good to see You online again  ;)
Have You talked to Peter ("following") yet? He is building up the oc.de development environment,
and with his help You can add OKAPI functionality to oc.de!
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: wrygiel am 17. August 2012, 10:56:14
@wrygiel: It´s good to see You online again  ;)
Have You talked to Peter ("following") yet? He is building up the oc.de development environment,
and with his help You can add OKAPI functionality to oc.de!

I just sent him an email :)

There are some things we need to think of first. E.g. OKAPI has a separate "mother" repository and it's best if it stayed this way (all commits go there). This way, we implicitly state that "all OC nodes are equal", and force all OKAPI developers to keep OKAPI compatible across all OC nodes.
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: ra_sch am 04. Dezember 2012, 23:29:47
Hello everybody.

By posting here I want to signal my interest in this topic as a geocaching-app developer (member of the c:geo team). As my personal interest in opencaching.de revitalised lately I was looking for ways to integrate it into c:geo.
I took a look at the xml-api. While it is sufficiently easy to use (it took me just a few hours to experimentally integrate it into search and live-map) its feature-set is not well suited for our app (e.g. no user-specific information on the cache like found and no write access), so I would like to ask for the state of things regarding OKAPI-integration (that we have already for the supporting sites) or what other possibilities exist for a seamless integration of opencaching.de into our app.

Regards

ra_sch
Titel: Re: API for OpenCaching.DE (and other sites)
Beitrag von: pjacobi am 19. November 2014, 19:20:45
Reviving this discussion to keep OKAPI stuff at one place. I'll start a new thread if you prefer this.

I just started to experiment with OKAPI and I'm wondering how easy (and efficient) it would be to search for attributes. Mainly to get result sets of only those caches which are opencaching-only, but the general ability would be nice too.

Can one expect evolution in this direction or is the general idea how to use OKAPI to replicate the entire database when a detailed analysis is desired.