Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am just starting on a mobile app for Ubuntu One, and I'm reviewing the info at https://one.ubuntu.com/developer/files/store_files/cloud

I find the information a bit lacking though. It's a nice reference, but for someone not familiar with it, I had to goggle search to find out what a "volume" was exactly (its kind of obvious, but never hurts to know the specifics)

There's also things like:

GET /api/file_storage/v1/volumes

Return a JSON list of Volume Representations, one for each volume. A volume is a synced folder, or the Ubuntu One folder, owned by the user. Note that all volume paths begin with ~.:

... but there's no such thing as a JSON "list". Does it mean array ?

And other things... So I was wondering if here existed another page with more detailed information. Maybe some sample request / responses or something? I could just write a little proof of concept app to answer some of these questions... but I prefer not to unless I have to.

Thanks

share|improve this question

1 Answer 1

up vote 0 down vote accepted

There isn't yet another page, although I'm working on it. (And yes, a JSON array.)

I'd be happy to chat over this stuff with you; it would be useful to me to get your feedback on what you'd like to see in the documentation (sample request/response pairs is a good idea), and hopefully useful to you as well. There are various example apps around; if you're developing on Ubuntu, you may find u1oauthrequest, in the ubuntuone-couch package, useful for testing: u1oauthrequest https://one.ubuntu.com/api/file_storage/v1/~/Ubuntu%20One will be the node for your Ubuntu One folder, for example. u1fn9 shows accessing the file storage API from JavaScript in a QML app; the source for the U1 Android and iOS apps is open and on Launchpad; u1ftp is a Python example of accessing the files API.

share|improve this answer
    
Thanks or your response. I am developing in j2me. Some sample request/response pairs would be great, yes. Another thing that would be nice to see is some member/value types. Mostly it is string, but sometimes I'm not sure. For example the "generation" value. Is it it sufficient to treat it as a int?, as a long? maybe even double? (json int/fraction/exponent) What format are the dates ("when_created") etc... –  Brian McCavour Nov 1 '12 at 17:26
    
I was able to answer some of these questions for myself by reverse engineering the sample apps. Seeing what method calls they were doing using whatever JSON library was linked. As I said, its a good reference, and it has all the information strictly "needed". Just having some of this other info, would certainly save some time, or help reduce any potential confusion. –  Brian McCavour Nov 1 '12 at 17:28
    
Cool; I'll look into some sample exchanges and data types. You may also find one.ubuntu.com/developer/files/store_files/android useful if you don't already know about it; it's a J2SE library, but it may work on j2me as well, or at least help you get started. –  sil Nov 2 '12 at 11:41
    
Hi again, I have a last question for you for. In J2ME there is no support for "PUT". Do the Ubuntu One web servers support some kind of POST with ?method=put appended to the URI? Just to save time making my own socket connections. –  Brian McCavour Nov 16 '12 at 19:18
    
I am trying to upload a file. I just tried every variation I could think of but I guess its not going to work, since apparently POST is not even accepted. Keep getting 405 :( –  Brian McCavour Nov 16 '12 at 19:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.