Examples
On this page you will find some more complex examples of using the Deta SDK.
Base
Put
Get
If the record is found, the returned promise will resolve to an object, else null
:
If the record is found, will return an object, else None
:
If the record is found, will return an object, else None
:
Insert
Put Many
Example output:
Output example:
Output example:
Update
Assume we have the following item in a Base:
We will use update
, via an updates
dictionary / object.
The above updates result in the following item in the Base:
Fetch
If we have the following items in a Base:
Then the following fetch calls:
results
will have the following data:
will return following data:
firstResult
:
secondResult
:
will return following data:
first_result.items
:
second_result.items
:
will return following data:
first_result.items
:
second_result.items
:
Fetch All Items
The following snippet will fetch all items from a Base:
Drive
Put
Async not supported yet.
Get
Async not supported yet.
Delete
Async not supported yet.
Delete Many
Async not supported yet.
An output includes a list
/ array
of successfully deleted files, and a dict
/ object
of failures with reasons:
List
The following snippet will list all files in a Drive:
Async not supported yet.
Outputs of list include a dict / object with paging
and names
keys.