mirror of
https://github.com/RGBCube/JsonWrapper
synced 2025-07-27 19:57:44 +00:00
Update README.md
This commit is contained in:
parent
5b9e8796d2
commit
8b473742c7
1 changed files with 4 additions and 2 deletions
|
@ -4,12 +4,14 @@ This was made for ClutterBot (still in development).
|
||||||
# Docs
|
# Docs
|
||||||
## `db.set(key: str, value)`
|
## `db.set(key: str, value)`
|
||||||
Sets the key to the value in the JSON.
|
Sets the key to the value in the JSON.
|
||||||
|
## `db.get(key: str, default=None)`
|
||||||
|
Returns the value of the key in the json, if the key isn't set in the json, it returns the default kwarg.
|
||||||
|
## `db.all()`
|
||||||
|
Returns all the JSON data.
|
||||||
## `db.rem(key: str)`
|
## `db.rem(key: str)`
|
||||||
Removes the key and value pair from the JSON.
|
Removes the key and value pair from the JSON.
|
||||||
|
|
||||||
Note that this will not do anything if the key isn't set in the JSON.
|
Note that this will not do anything if the key isn't set in the JSON.
|
||||||
## `db.get(key: str, default=None)`
|
|
||||||
Returns the value of the key in the json, if the key isn't set in the json, it returns the default kwarg.
|
|
||||||
## `db.nuke()`
|
## `db.nuke()`
|
||||||
Deletes everything in the JSON.
|
Deletes everything in the JSON.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue