Is there an API set for Ubuntu One? For example, an API to sync contacts, bookmarks, etc.
Asked
Active
Viewed 445 times
3 Answers
11
The common way to store something persistently and have it synchronise with Ubuntu One is to just use desktopcouch. Here's an example:
from desktopcouch.records.server import CouchDatabase
from desktopcouch.records.record import Record
database = CouchDatabase("askubuntu_test", create=True)
record = Record(
{"site": "askubuntu.com", "awesome": True}, "http://example.com")
database.put_record(record)
Where "example.com" should ideally point to a description of your record format.
And to retrieve the information afterwards:
database = CouchDatabase("askubuntu_test")
for i in database.get_records(create_view=True):
print i
The API to desktopcouch is pretty straightforward, have a look at the Desktopcouch Documentation to learn more about it.

Stefano Palazzo
- 86,783
6
What @Stefano said. Also, right now there isn't a single place where you can go and read up on all the different APIs related to Ubuntu One, but we're building it in time for Natty.

Chipaca
- 9,990
-
I can't wait :) – Stefano Palazzo Jan 15 '11 at 14:57
-
2Neither can I. And I'm building it. :) – sil Jan 15 '11 at 20:17
-
ha, great! waiting for it – feifan.overflow Jan 16 '11 at 03:57