Skip to content

Commit a832f8b

Browse files
authored
Merge pull request #39 from seatable/scripts-doc-rework
Scripts doc rework
2 parents ad58e92 + 73274fc commit a832f8b

69 files changed

Lines changed: 6231 additions & 2512 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
Welcome to the SeaTable Developer's Repository! 🌊🔍✨
44

5-
This repository serves as the foundational source for the SeaTable Developer's Manual available at https://developer.seatable.com. The developer manual is generated with the help of MkDocs Material and is a comprehensive guide and resource hub for developers aiming to build extensions, scripts, plugins, or custom applications within SeaTable.
5+
This repository serves as the foundational source for the SeaTable Developer's Manual available at https://developer.seatable.com. The Developer Manual is generated with the help of MkDocs Material and is a comprehensive guide and resource hub for developers aiming to build extensions, scripts, plugins, or custom applications within SeaTable.
66

77
## Content
88

99
- **Introducion**: Explanation of fundamental approaches and SeaTable basic concepts.
1010
- **Scripting in SeaTable**: Detailed instructions on scripting with a complete function overview and ready-to-use scripts.
1111
- **Plugin Development**: Step-by-step guide to developing your own SeaTable plugin.
12-
- **Client API's**: List of ready-to-use API clients for various programming languages like JavaScript, Python, and PHP.
12+
- **Client APIs**: List of ready-to-use API clients for various programming languages like JavaScript, Python, and PHP.
1313

1414
## How to participate
1515

16-
Please fell free to particiate in the developer manual by creating pull requests. Before you do this, please test your changes in a local copy of this manual. Here is how you can do this.
16+
Please fell free to participate in the Developer Manual by creating pull requests. Before you do this, please test your changes in a local copy of this manual. Here is how you can do this.
1717

1818
> :warning: Docker is required
1919
>
@@ -30,7 +30,7 @@ git checkout -b <new_branch>
3030
# please replace <new_branch> with something short like "add_python_example"
3131
```
3232

33-
### Step 2: Generate your local version of the developer manual
33+
### Step 2: Generate your local version of the Developer Manual
3434

3535
We developed a tiny bash script to generate the local copy of the manual.
3636

@@ -52,7 +52,7 @@ git commit -m "<commit_message>"
5252
git push
5353
```
5454

55-
### Step 4: Stop the docker container with your local admin manual copy
55+
### Step 4: Stop the docker container with your local Developer Manual copy
5656

5757
```bash
5858
./preview.sh -stop

‎docs/clients/index.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Client API's
1+
# Client APIs
22

3-
Thanks to seatable's full API, virtually anything can be controlled with any programming language.
3+
Thanks to SeaTable's full API, virtually anything can be controlled with any programming language.
44

5-
On [https://api.seatable.com](https://api.seatable.com) you can find all available API commands and sample commands for different programming languages.
5+
On the [API Reference](https://api.seatable.com) you can find all available API commands and sample codes for different programming languages.
66

77
For a few programming languages there are already ready-to-use client APIs classes that do some of the work for you. These are presented in this part of the documentation.

‎docs/clients/javascript/columns.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Every table in a base contains columns. The following calls are available to int
121121

122122
!!! question "addColumnOptions"
123123

124-
Used by single-select or multiple-select type columns
124+
Used by "single select" or "multiple select"-type columns
125125
``` js
126126
base.addColumnOptions(table_name, column, options)
127127
```
@@ -137,7 +137,7 @@ Every table in a base contains columns. The following calls are available to int
137137

138138
!!! question "addColumnCascadeSettings"
139139

140-
Used by single-select column, to add a limitation of child column options according to the option of parent column
140+
Used by "single select"-type column, to add a limitation of child column options according to the option of parent column
141141
``` js
142142
base.addColumnCascadeSettings(table_name, child_column, parent_column, cascade_settings)
143143
```

‎docs/clients/javascript/javascript_api.md‎

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# JavaScript Client
1+
# JavaScript client
22

3-
The SeaTable JavaScript Client encapsulates SeaTable Server Restful API. You can call it in your front-end page or Node.js program.
3+
The SeaTable JavaScript client encapsulates SeaTable Server Restful API. You can call it in your front-end page or Node.js program.
44

5-
!!! danger "JavaScript API cannot be used for scripts in SeaTable bases. For script programming with Javascript, there is a [separate chapter](/scripts/) in this documentation."
5+
!!! warning "Two different clients"
6+
JavaScript API cannot be used for scripts in SeaTable bases. For script programming with JavaScript, there is a [separate chapter](../../scripts/javascript/objects/index.md) in this documentation.
67

7-
Note, JavaScript API calls SeaTable Server Restful API, while scripts in SeaTable bases interact with the base loaded in the browser, so the APIs of the two are somewhat different.
8+
Note that JavaScript API calls SeaTable Server Restful API, whereas scripts in SeaTable bases interact with the base loaded in the browser, so the APIs of the two are somewhat different.
89

910
## Installation
1011

@@ -16,45 +17,43 @@ The source code of the JavaScript Client API is available at [GitHub](https://gi
1617

1718
## Reference
1819

19-
To use SeaTable APIs, you should first initialize a base object and call `base.auth()`. `base.auth()` is an async function, which needs to be executed in async functions. Other APIs all return a promise object. There are two ways to use them
20+
To use SeaTable APIs, you should first initialize a base object and call `base.auth()`. `base.auth()` is an async function, which needs to be executed in async functions. Other APIs all return a promise object. There are two ways to use them:
2021

21-
The first way:
22+
=== "First way using then"
2223

23-
```
24-
base.listViews(tableName).then(views => {
25-
// Use views to complete the requirements
26-
}).catch(error => {
27-
// Exception handling
28-
})
29-
```
24+
```js
25+
base.listViews(tableName).then(views => {
26+
// Use views to complete the requirements
27+
}).catch(error => {
28+
// Exception handling
29+
})
30+
```
3031

31-
The second way:
32+
=== "Second way using await"
3233

33-
```
34-
try {
35-
const views = await base.listViews(tableName);
36-
// Use views to complete the requirements
37-
} catch (error) {
38-
// Exception handling
39-
}
40-
```
34+
```js
35+
try {
36+
const views = await base.listViews(tableName);
37+
// Use views to complete the requirements
38+
} catch (error) {
39+
// Exception handling
40+
}
41+
```
4142

42-
SeaTable API Errors
43+
Here are the main SeaTable API errors you might encounter:
4344

4445
- 400 Params invalid
4546
- 403 Permission denied
46-
- 413 exceed limit
47+
- 413 Exceed limit (see the [API Reference](https://api.seatable.com/reference/limits) about limits)
4748
- 500 Internal Server Error
4849

4950
## Authorization
5051

51-
Base represents a table. You can use the api token of the form to obtain the authorization to read and write the base. This token can be generated directly on the web side.
52-
53-
Use the API Token of the base to get access authorization.
52+
The `Base` object represents a table. You need to specify an `APIToken` to get access authorization and to be able to read and write the base. API tokens can be directly [generated in the web interface](https://seatable.com/help/erzeugen-eines-api-tokens/).
5453

55-
##### Example
54+
__Example__
5655

57-
```javascript
56+
```js
5857
import { Base } from "seatable-api";
5958

6059
const config = {

‎docs/clients/php_api.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# PHP Client
1+
# PHP client
22

33
SeaTable's API exposes the entire SeaTable features via a standardized programmatic interface. The _SeaTable PHP Client_ encapsulates SeaTable Server Restful API. If you are familiar this client enables you to call every available API endpoint of SeaTable. You can interact with the user accounts, bases or files.
44

5-
!!! success "Auto generated from openapi specification"
5+
!!! info "Auto generated from openapi specification"
66

77
Since April 2024, we auto generate this SeaTable php client from our public available openapi specification. The advantage is that, the php client automatically contains all available API endpoints and we save a lot of programming capacity. Also we could generate more api clients for other programming languages in no time with the same feature set. The disadvantage is, that with this new client we removed some convenitent functions for authentication and the new version is not compatible at all with the version v0.2 and earlier.
88

@@ -16,7 +16,7 @@ composer require seatable/seatable-api-php
1616

1717
The source code of the PHP Client API is available at [GitHub](https://github.com/seatable/seatable-api-php).
1818

19-
## Getting Started
19+
## Getting started
2020

2121
After installation you can easily connect to your SeaTable system and execute API calls.
2222

‎docs/clients/python_api.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Python Client
1+
# Python client
22

3-
The SeaTable Python Client encapsulates SeaTable Server Restful API. You can call it in your python programm.
3+
The SeaTable Python Client encapsulates SeaTable Server Restful API. You can call it in your python program.
44

5-
!!! success "External python programms and python scripts, executed in SeaTable, use the same python library and therefore share the same functions. For an overview of the available functions, read the chapter of [script programming with Python](/scripts/python/basic_structure_python/) in this documentation."
5+
!!! info "Unique Python library"
6+
Unlike JavaScript, external python programs and python scripts, executed in SeaTable, use the same python library and therefore share the same functions. For an overview of the available functions, read the chapter of [script programming with Python](../scripts/python/introduction.md) in this documentation."
67

78
## Installation
89

‎docs/clients/ruby_api.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Ruby Client
1+
# Ruby client
22

3-
One of our community members [made a first version](https://forum.seatable.com/t/seatable-ruby-ruby-gem-for-seatable/2366) of a SeaTable Ruby Client.
3+
One of our community members [made a first version](https://forum.seatable.com/t/seatable-ruby-ruby-gem-for-seatable/2366) of a SeaTable Ruby client.
44

5-
The source code of the Ruby Client API and additional explanations are available at [GitHub](https://github.com/viktorMarkevich/seatable_ruby).
5+
The source code of the Ruby client API and additional explanations are available at [GitHub](https://github.com/viktorMarkevich/seatable_ruby).

0 commit comments

Comments
 (0)