aboutsummaryrefslogtreecommitdiff
path: root/api/tables.yaml
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-21 14:45:39 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-21 14:45:39 -0400
commit6ee5af0a16a5f1a32eb933e30d8b86ff4e691beb (patch)
treea4ccc48bef576be1cfd4d30342eebc684474e8f5 /api/tables.yaml
parent868ca31562dcc5d484d8f015adfa173c0a43c415 (diff)
Add short descriptions for API methods to improve manpages
Diffstat (limited to 'api/tables.yaml')
-rw-r--r--api/tables.yaml6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/tables.yaml b/api/tables.yaml
index 6ab5f505..6a58e818 100644
--- a/api/tables.yaml
+++ b/api/tables.yaml
@@ -1,4 +1,5 @@
Table.clear:
+ short: clear a table
description: >
Removes all key-value pairs from the table.
return:
@@ -14,6 +15,7 @@ Table.clear:
>> t.clear()
Table.get:
+ short: get an item from a table
description: >
Retrieves the value associated with a key, or returns `none` if the key is not present.
note: >
@@ -46,6 +48,7 @@ Table.get:
= 0
Table.get_or_set:
+ short: get an item or set a default if absent
description: >
If the given key is in the table, return the associated value. Otherwise,
insert the given default value into the table and return it.
@@ -85,6 +88,7 @@ Table.get_or_set:
= &{"A"=@[1, 2, 3, 4], "B"=@[99], "C"=@[0, 0, 0]}
Table.has:
+ short: check for a key
description: >
Checks if the table contains a specified key.
return:
@@ -107,6 +111,7 @@ Table.has:
= no
Table.remove:
+ short: remove a table entry
description: >
Removes the key-value pair associated with a specified key.
return:
@@ -129,6 +134,7 @@ Table.remove:
= {"B"=2}
Table.set:
+ short: set a table entry
description: >
Sets or updates the value associated with a specified key.
return: