Instance API
When querying an individual instance object bot
, user
or flow
.
Attribute | Description |
---|---|
| Get the value associated with the key. |
| Store the provide value along with the key. |
| Provides the unique |
| Returns all of the data for the instance. |
| Updates one or more values for the instance, |
|
|
self.db.user.get('name')
"Nikola"
self.db.flow.set('order', 'Pizza')
{
'id': "Rxxxxxxx",
'order': "Pizza"
}
self.db.bot.id
"B0123456789"
self.db.user.all()
{
'id': 'Uxxxxxxxxx',
'name': 'Nikola',
'dob': 'July 10, 1856'
}
self.db.bot.update({'alive': True})
{
'id': 'Bxxxxxxxxx',
'timezone': "Canada/Eastern",
'alive': True
}
self.db.bot.put({'awesome': True, 'alive': True})
{
'id': 'Bxxxxxxxxx',
'awesome': True
'alive': True
}
Updated 18 days ago