https://github.com/raudius/basescript
Scripting plugin for Baserow
https://github.com/raudius/basescript
Last synced: 11 months ago
JSON representation
Scripting plugin for Baserow
- Host: GitHub
- URL: https://github.com/raudius/basescript
- Owner: Raudius
- Created: 2024-08-11T16:37:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-12T18:04:54.000Z (almost 2 years ago)
- Last Synced: 2024-08-13T12:54:15.534Z (almost 2 years ago)
- Language: Python
- Size: 152 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BaseScript
Scripting plugin for Baserow.
## Demo
https://github.com/user-attachments/assets/f2156f4f-d0b1-4a8f-982b-da6f2b8d1596
## Scripting API
This plugin is still in early development and the API is not finalised. The following functions are currently implemented but may be subject to change in future versions of the plugin.
### `getBase({ id, name }): Promise`
Will find a matching database in the current workspace with the given ID and/or name. If only the name is provided and there are more than one matching databases in the workspace, it will fail.
### `[Database]->getTable({ id, name }): Promise`
Will find a matching table in the database.
### `[Table]->select(queryProps: Object): Promise`
The `queryProps` are similar to the ones listed (and work in the way described) in the api-docs of the table's `List rows` endpoint.
See: https://api.baserow.io/api/redoc/#tag/Database-table-rows/operation/list_database_table_rows
```js
{
page, // Number
size, // Number
userFieldNames, // Boolean
search, // String
order_by, // String
filters, // Object
include, // String
exclude // String
}
```
### `[ResultSet]->next(): Promise`
Returns the next page of query results.
### `io.text(text: String): Promise`
Displays the `text` on screen.
### `io.table(table: QueryResult): Promise`
Displays the `table` on screen.
### `io.button(text: String): Promise `
Displays a button with the given `text` on screen.
### `io.pickRow(table: Table): Promise`
Displays a button on screen, which allows the user to pick a row from the given `table`. Returns the selected row object.