angelos.lib.api.crud¶
Facade contact API.
-
class
angelos.lib.api.crud.CrudAPI(facade: angelos.lib.facade.base.BaseFacade)¶ Bases:
angelos.lib.api.api.ApiFacadeExtensionCrud API implements the underlying functionality for a RESTful API.
-
ATTRIBUTE= ('crud',)¶
-
create(url: unicode, data: bytearray) → bool¶ Create a file.
- Parameters
url (str) – Angelos url to file to be created
data (bytearray) – Data to be written to new file
- Returns (bool):
Success of failure
-
delete(url: unicode) → bool¶ Delete a file.
- Parameters
url (str) – Angelos url to the file to be deleted
- Returns (bool):
Success of failure
-
list(url: unicode) → Set[str]¶ Index list of a directory.
- Parameters
url (str) – Angelos url
- Returns (Set[str]):
A set of filenames
-
read(url: unicode) → bytearray¶ Read a file.
- Parameters
url (str) – Angelos url to file to be read
- Returns (bytearray):
Data from read file
-
update(url: unicode, data: bytearray) → bool¶ Update a file.
- Parameters
url (str) – Angelos url to the file to be updated
data (bytearray) – Updated data
- Returns (bool):
Success of failure
-