Ubuntu One API Java - how to use REST and AccessToken?

Posted by Michael on Ask Ubuntu See other posts from Ask Ubuntu or by Michael
Published on 2012-12-19T21:47:30Z Indexed on 2012/12/19 23:14 UTC
Read the original article Hit count: 288

Filed under:
|

I am writing a java app in eclipse that backups data to several consumer-cloud-services encrypted and redundant.

So far, I successfully implemented the authentication process, as it is described in the documentation.

At this point, I do not know how to proceed. The next step would be implementing the auth with the stored AccessToken and afterwars implementing upload/download/listing functionality through the REST API.

  1. I think I have to store the String oauth.getSerialized(). How do I authenticate with this String afterwards? This does not work e.g.:

    AuthenticateResponse oauth = api.authenticate(serialized);
    api.setAuthorizer(new OAuthAuthorizer(oauth));
    
  2. Can someone tell me please, how I can use the REST API with java? There is no explanation or link in the developers area as far as I saw.

And btw, I wasted at least one hour trying to fix errors, because some needed libraries are listet after the example code. :/

© Ask Ubuntu or respective owner

Related posts about java

Related posts about ubuntu-one-api