Problems with accessing data from Google Calendar API - java

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!

Related

How to make a connection to a Google Drive folder using the Drive API

I've searched a lot through the web about this topic (even on StackOverflow), but the questions I was looking at weren't able to help me, so, here it is (Although im very good at it, english is not my native language, so I'm sorry for any mistake made): (SKIP TO EDIT)
I'm making a simple chat program in Java (self learning), and, at first, I wanted to access a file on my computer. I soon found it hard to acomplish, and decided I wanted to access a drive folder on MY account. So, I googled about a possible Google Drive API. And I found it!!!
I downloaded a copy of the API to my PC, and then i went online to know how to use the API, but the README.txt file and the youtube tutorial were not helpful at all, because i could not understand the instructions. I Looked everywhere but still didnt find an easy-to-understand answer.>
So, im asking if any of you could provide a step-by-step tutorial on how i can accomplish my goal. Ive created projects on the API consoles, but im a bit confused on what to do with them (possibly going to delete them).
EDIT/REDO:
I'm making a chat program, and I want EVERY copy of the program to access a folder on my personal Google Drive and get certain files from it, where ever the user is, and without him having to see the OAuth 2.0 Autorization screen(if this last step cant be skipped, I'll work with that too).
The problem is that, although i have checked the README.txt and the youtube tutorial, i still dont understand how to use the API in the way i want.
So, im asking if any of you could provide a step-by-step tutorial on how i can accomplish my goal, i.e, (Some code could be of great use):
1st-Do this;
2nd-Do that;
...
(n steps)-You are ready;
Thank you in advance!!
P.S.: this is my last "free" question, so if this specific question has been answered please comment it out.
To start using Drive API, you may may want to follow and complete the steps given in Java Quickstart.
Then to integrate with the Drive UI, you may want to check the following references:
Enable the Drive Platform - to get started integrating with the Drive UI, you need to enable the Drive API and provide configuration details in your API project. This gives you access to the API as well as access to UI integration features.
Install Your App - Google Drive lets users install an app by approving an OAuth 2.0 access request.
Open Files - this page describes how to integrate your app with these Drive UI features to open files stored in Google Drive
Hope that helps!

App-Engine Connected Android Project: Does Google-Eclipse Plugin generate Client Endpoints for iOS and JavaScript in addition to the android api

Old
I need to work on the iOS version of my app. The App-Engine and Android portions are completed using the Google Eclipse Plugin (GPE). In the Official Google Documentations I am told the easiest way is to use maven. Does anyone know how I might add maven to the App-Engine portion of my “connected” project?
Apparently I only need to add the following one line in the maven file
mvn appengine:endpoints_get_discovery_doc
Update
Again, I need to get the iOS client for an endpoint project that I created with the Google Eclipse Plugin as an App-engine Connected Android Project. From eclipse I simply do [Right Click] > Google > Generate Cloud Endpoint Client Library and it generates the library for android. But now I just look in my war directory and I see three files: myendpoint-1-rest.discovery, myendpoint-1-rcp.discovery, myendpoint-1-rest.api.
Now this is a wild guess, but are these the files I need for iOS and JavaScript? Or must I follow the instructions in the official docs to get the discovery files for iOS? What I mean is I have not generated the files per the instructions but I have used the GPE for creating the endpoints for android. Does GPE create the necessary clients for iOS and JavaScript as well? I cannot find any documentation on that.
Javascript client only needs to include script https://apis.google.com/js/client.js. You can load your API using
gapi.client.load('api-name', 'v1', callback, 'https://app_id.appspot.com/_ah/api');
Objective-C client needs some extra work after generating your discovery doc.

Google Analytics API DataQuery object

I am new to Java and to the Google Analytics API. I am using Eclipse Kepler Service Release 1. I want to write a small console program in java that will read the output from another program(Start Date and End Date) from a console and query Google Analytics to return some Event Labels and write them to a csv.
I am having trouble getting started though. Google's getting started tutorial is not that helpful and also I can't figure out how to add jars from the API to my solution. I'm trying to use a DataQuery object because that is how the tutorial suggests you start, but I am pretty sure the object is not in any of the jar files that come with the Google Analytics API.
I think they are in the Core Reporting API. I installed the Google API plugin for eclipse but the Core Reporting API is not listed and I cannot find a download for it online.
Does anyone know how to download the Core Reporting API or if this is even the correct place to start?
Does anyone have any good examples of a Java program that does something similar that they are willing to share?
This tutorial of google having full java example you can customize it for different data queries
https://developers.google.com/analytics/devguides/reporting/core/v2/gdataJava
This is query explorer tool provided by google
http://ga-dev-tools.appspot.com/explorer/

How to use Skype Java API inside android application?

I want to make one application that will monitor chat history of other IM in phone.
I couldn't find any Skype API for Android, although I found Skype4Java API from net. I wish to use this in an Android application. I have imported the .jar file of that API to my Java build path. When I run my code, I am getting errors for libskype.jnilib and libskype.so file.
I also can't delete that file also, because when I attempt to delete that I get an error. Please tell how to do that?
How can I use Skype's Java API inside an Android app?
As of the current writing of this answer, there is no Android implementation of Skype. There are numerous third-party chat APIs, although I personally can't name one since I haven't worked with any.
The reason why the Skype4Java API is throwing errors at you is because it was not designed for use with Android. To delete the .jar file, you must remove all references to it and remove it from your build path for attempting a delete.

Facebook API and Facebook Connect using Java?

New to Facebook API and Facebook Connect.
Found the Facebook Java API open source library on Google Code...
I am really excited that there's an API pre-written in Java for it!
Am interested in writing a server side Java layer which uses REST to be able to access a user’s Facebook Friends List, their wall, send them messages in-network, etc.
Downloaded the binary and unfortunately, I haven't found any sample or demo code when I unzipped it...
Question(s):
(1) Does this library support Facebook Connect?
(2) What is the best way to get start using Facebook Connect with server side Java?
(3) Since I am building middleware, do I still have to create a sample app on the online Facebook Developer page?
(4) What should I include in my (am a newbie in Maven) pom.xml in order to get started?
Use RestFB, that seems to be the inofficial FB Java Api:
http://restfb.com/
(There is no official FB Java Api anymore)
As far as I know, that library is broken. I couldn't get authentication to work with the latest version.
In my search for alternatives i found the "TinyFBTagLibrary" http://www.socialjava.com/ --
Yes, it requires just about a billion extra libraries to run, but it offers a simple way to execute facebook API calls in java that ISNT BROKEN (once again, as far as I know). My advice is to ignore all of the predefined tags for use in jsp and scroll down to the bottom to see how to use the TinyFBClient.call/getResponse when you need to get information.

Categories

Resources