I want to get a users calendar events (entries) via the java google calendar API (V3.0). Unfortunately, I was unable to find any working example (tutorial) or successfully run anything. What I did so far:
- I checked the APIs Explorer and successfully run some requests via the google website and my developer api key (conclusion: my API access works in theory).
- I tried to follow the “Your first App“-guide. There are two ways to invoke the API: REST or client libraries. I want to use the java client library.
- So I tried to set up the client library : downloaded the jars and added them to the build path (in eclipse) – as I usually do this with external jars. I now can import the classes without errors.
- Here, the guide finishes abruptly if I want to use the java client library instead of directly accessing it via REST…
- From here I have absolutely no idea what to do. I found a lot of examples in the web (usually for the v1.0 or v2.0 API), but was unable to run any of them. (On Google Developers I found several examples, but all for Android or AppEngine. Nothing worked…)
Does anyone of you know a very simple example to get a users events via Java library (Google Code API)?
solved it on my own. For all of you who want to start using the Google APIs in Eclipse. I highly recommend using Maven which immensely helps including the right jars (actually, it does it for you). Then try this example code (link) to start (OAuth2 authentication). You also will need a dev account and API key from google: link. Then you can start coding 🙂 enjoy!