-
Notifications
You must be signed in to change notification settings - Fork 140
api specification
nvbn edited this page Mar 3, 2013
·
2 revisions
Api version 1
- Provider -- "com.everpad.Provider", '/EverpadProvider'
-
Pad -- "com.everpad.App", "/EverpadService"
In everyday use please use
everpad.tools.get_providerandeverpad.tools.get_pad.
For basetypes please use classes from everpad.basetypes, for creating new basetype inherit DbusSendable and fill fields with tuple of pairs (name, signature).
class DbusSendable(object):
@classmethod
def from_obj(cls, data):
...
@classmethod
def from_tuple(cls, data):
...
@property
def struct(self):
...
def give_to_obj(self, obj):
...
class Note(DbusSendable):
ORDER_TITLE = 0
ORDER_UPDATED = 1
ORDER_TITLE_DESC = 2
ORDER_UPDATED_DESC = 3
fields = (
('id', 'i'),
('title', 's'),
('content', 's'),
('created', 'x'),
('updated', 'x'),
('notebook', 'i'),
('tags', 'as'),
('place', 's'),
('pinnded', 'b'),
)
class Notebook(DbusSendable):
fields = (
('id', 'i'),
('name', 's'),
('default', 'i'),
)
class Tag(DbusSendable):
fields = (
('id', 'i'),
('name', 's'),
)
class Resource(DbusSendable):
fields = (
('id', 'i'),
('file_name', 's'),
('file_path', 's'),
('mime', 's'),
('hash', 's'),
)
class Place(DbusSendable):
fields = (
('id', 'i'),
('name', 's'),
)###Provider
-
get_note(id) -> Notein:iout:Note.signature -
find_notes(words, notebooks, tags, place, limit=100, order=Note.ORDER_UPDATED, pinnded=-1) -> Note[]in:saiaiiiiiout:a+Note.signature -
list_notebooks() -> Notebook[]out:a+Notebook.signature -
get_notebook(id) -> Notebookin:iout:Notebook.signature -
get_notebook_notes_count(id) -> intin:iout:i -
update_notebook(notebook_struct:Notebook) -> Notebookin:Notebook.signatureout:Notebook.signature -
delete_notebook(id) -> boolin:iout:b -
list_tags() -> Tag[]out:a+Tag.signature -
create_note(data:Note) -> Notein:Note.signatureout:Note.signature -
update_note(note:Note) -> Notein:Note.signatureout:Note.signature -
update_note_resources(note:Note, resources:Resource[]) -> boolin:Note.signature+a+Resource.signatureout:b -
delete_note(id) -> boolin:iout:b -
create_notebook(name) -> Notebookin:sout:Notebook.signature -
authenticate(token)in:s remove_authentication()-
get_note_resources(note_id) -> Resource[]in:iout:a+Resource.signature -
list_places() -> Place[]out:a+Place.signature -
get_status() -> intout:i -
get_last_sync() -> strout:s sync()-
set_sync_delay(delay)in:i -
get_sync_delay() -> intout:i -
is_first_synced() -> boolout:b -
get_api_version() -> intout:i kill()
###Pad
-
open(id)in:i -
open_with_search_term(id, search_term)in:is create()-
create_wit_attach(name)in:s settings()kill()
##Signals ###Provider
-
sync_state_changed(state)signature:i data_changed()