14

Is there an API set for Ubuntu One? For example, an API to sync contacts, bookmarks, etc.

Bruno Pereira
  • 73,643

3 Answers3

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.

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
2

Yes.. try see this: https://one.ubuntu.com/developer/

Voidcode
  • 733