Standardized API client for the Retool API.
Install the package using go get:
go get -u github.com/thoughtgears/retoolsdkpackage main
import (
"context"
"fmt"
"log"
"os"
"github.com/thoughtgears/retoolsdk"
)
func main() {
// Create a new Retool client
client, err := retoolsdk.NewClient(os.Getenv("RETOOL_API_KEY"), os.Getenv("RETOOL_ENDPOINT"))
if err != nil {
log.Fatalf("Failed to create Retool client: %v", err)
}
users, err := client.ListUsers(nil)
if err != nil {
log.Fatalf("Failed to list users: %v", err)
}
}The Retool API is documented using the OpenAPI 3.0 format and available at https://api.retool.com/api/v2/spec. All API documentation can be found on the Retool API Docs page.
By default, responses include up to 100 items. When there are more items, the has_more field in the response is set to true and the next field has a pagination token.
{
"data": [
{...},
],
"has_more": true,
"next": "opaque-pagination-token"
}To request the next page of results, include the token in the URL parameters of the request:
curl -H "Authorization: Bearer {token}" https://api.retool.com/api/v2/resources?next=opaque-pagination-tokenWe welcome contributions! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them with clear and concise messages.
- Push your changes to your fork.
- Open a pull request to the main repository.
If you encounter any issues, please report them using the GitHub issue tracker. Provide as much detail as possible, including steps to reproduce the issue and any relevant logs or screenshots.