Trying to get the Exchange java libary into eclipse - java

I'm trying to make a bot and was going to use the XChange API to talk to the servers.
I cannot figure out how to set the library up on eclipse.
On the url (git hub)
https://github.com/timmolter/XChange
at the buttom it says
For the latest bugfixes and features you should use the [snapshot jars] (https://oss.sonatype.org/content/groups/public/org/knowm/xchange/) or build yourself from the DEVELOP
I went to the snapshoot page, a buch of links not simply a list of files tro download.
Trying to figure out the best way to get this into eclipse.

Related

Uploading files in google colab

So I am writing code in java in google colab because I want to copy-paste the code in android studio to perform a specific function. Now in python it is pretty easy to upload files to google colab but I want to do it in java (I particularly want to upload image files). I should be able to upload image files in such a way that I can use it as input in my code. How can I do it? Also, for all the packages that I import in google colab, will I have to separately download them for android studio or can I just copy-paste the code and it will run?
Google Colab presents a Jupyter-notebook like environment for Python code only. It cannot run Java code (at least, I cannot find where you'd make it do that).
I want to copy-paste the code in android studio to perform a specific function
Android code runs on an Android device, not in a server.
If you want to run Java code on a server, then you'd host an HTTP-based Java web-server that you use an HTTP Client from Android app to communicate with it. (In theory, yes, you can install and run JAR files in Colab, but you would then need to know the IP of those servers in order to connect with them).
The more appropriate solution would be to use Google AppEngine or GCE/GKE (assuming you want to use Google Cloud)
I ... want to upload image files
You can use the Java Google Drive SDK for that
for all the packages that I import in google colab, will I have to separately download them for android studio
Android Studio is an IDE. Gradle will download packages for compiling your Java/Android code, yes, but as mentioned, Colab is downloading Python packages, not Java

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.

Integrate endpoints.cmd generated library from maven eclipse plugin project into android app

I'm a bit of a newbie to all this.. but I can't seem to find any specific instructions for my scenario
I have built a simple endpoint api, using a maven project via eclipse.
I have built an android app, and just want to add a little test in it to use the simple api.
(sidenote: i have also built an app engine web app which will later also [i hope] make use of the same endpoint api, so both the web app and the android app make use of the same library / code)
anyway, I'm stumbling on a couple steps.
I can't seem to use the eclipse 'google -> generate cloud endpoint client library' option, since it's a maven project.
So i found on the google site, instructions to use the endpoints.cmd commandline to generate the library.
I successfully did this apparently (it created a zip file rather then just a jar)
here is where i am confused what to do next.. or if i missed something.
I have tried adding the jar within the zip as a library in the build path for my android app.
When I do that, I see that the Builder member doesn't seem to have been added.
Should I expect it to have been added by the library generation?
I can't seem to do anything in my android app code to use the library.
What am I missing / doing wrong?

Problems with accessing data from Google Calendar API

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!

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