Ubuntu One Files should provide a REST API with a better way to allow application access.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu One Servers |
Fix Released
|
High
|
John O'Brien |
Bug Description
Hi John
Thanks a lot for your response. Some kind of REST API would be perfect.
Having the Ubuntu One website to access Ubuntu One from everywhere is great. But a with a standalone application I could provide some additional functionality that is not possible within a browser. I think about multiple file upload, folder upload and functions the like. JavaME can run on old mobile phones, JavaFX targets smart phones and things like TV set-top boxes. So getting basic Ubuntu One access to work in Java seemed like a good idea to me. This is a hobby project of mine, so I only work on it when time permits. But I have already done quite some work. By now I have around 150 classes. My application can do pretty much all file based operations (browse files/folders, create folder, upload, delete, rename).
I had a look at what the website is doing (using Firebug) and found the calls I mentioned in the first message. Using JSON to send and receive data worked just fine. For web-services I prefer JSON over XML, but that is just a question of taste.
Yeah, the authentication that is quite a hack. I tried to use OAuth, but could not get it to work. I found examples for twitter.com and other services, but it seems to me that everybody is doing it a little different. I have a feeling the OAuth is not quite there yet. So I went back to the Ubuntu One website, had a look how login works there and just do what the website does. I use the Apache HttpClient project, to do GET and POST requests, fill in forms and just emulate a browser. So my application looks like a browser without JavaScript support to the Ubuntu One servers.
What I don't like about OAuth is that an application has to redirect the user to the login page and gets a callback once the login happens. For standalone applications that is quite unpracticable, even more for apps on mobile phones.
Google has all kinds of APIs. I would have a look how they are doing things:
http://
For example here is how the Google APIs handles authentication:
http://
If you need more information, need help in design the API, reviewing the API design or beta test stuff, just let me know. I'd be happy to help.
Regards, Adrian
affects: | ubuntuone-client → ubuntuone-servers |
Changed in ubuntuone-servers: | |
status: | New → In Progress |
Changed in ubuntuone-servers: | |
assignee: | nobody → John O'Brien (jdobrien) |
importance: | Undecided → High |
status: | In Progress → Fix Released |