feat: add read-only support of the meta API (#13)

* Add bases API.

* Implement get tables schema

* Rename GetBase to GetBaseSchema

* Add tests

* Update doc
This commit is contained in:
François de Metz
2023-01-01 15:18:29 +01:00
committed by GitHub
parent 6275e61012
commit 1b1e6e9e92
7 changed files with 275 additions and 0 deletions

View File

@@ -43,6 +43,18 @@ You should get `your_api_token` in the airtable [account page](https://airtable.
client := airtable.NewClient("your_api_token")
```
### List bases
```Go
bases, err := client.GetBases().WithOffset("").Do()
```
### Get base schema
```Go
schema, err := client.GetBaseSchema("your_database_ID").Do()
```
### Get table
To get the `your_database_ID` you should go to [main API page](https://airtable.com/api) and select the database.