budibase/packages/sdk
Budibase Release Bot a51545dd3e v2.0.18 2022-10-04 14:10:26 +00:00
..
scripts Use promises when generating public API SDK rather than promisifying after 2022-09-15 15:38:09 +01:00
src Export SDK as a class to allow multiple instances 2022-09-21 19:12:25 +01:00
.gitignore Improve SDK generation and wrap, promisify and simplify SDK client configuration 2022-09-15 15:17:19 +01:00
README.md Improve SDK generation and wrap, promisify and simplify SDK client configuration 2022-09-15 15:17:19 +01:00
package.json v2.0.18 2022-10-04 14:10:26 +00:00
rollup.config.js Improve SDK generation and wrap, promisify and simplify SDK client configuration 2022-09-15 15:17:19 +01:00
yarn.lock Update delete endpoints to be called destroy 2022-09-26 14:18:31 +01:00

README.md

Budibase Public API SDK

JS SDK for the Budibase Public API.

This SDK is generated by swagger-codegen.

Docker is used to run the generator, so Java is not required. Docker is the only requirement to generate the SDK.

The generated code will only run in a browser. It is not currently useable in a NodeJS environment.

Example usage

import { configure, ApplicationsApi } from "@budibase/sdk"

// Configure the API client
configure({
  apiKey: "my-api-key",
  host: "https://my.budibase.app"
})

// Search for an app.
// We can use the promisified version...
const res = await ApplicationsApi.applicationsSearchPost({ name: "foo" })
console.log("Applications:", res.data)

// ...or the callback version
ApplicationsApi.applicationsSearchPost({ name: "foo" }, ((error, data) => {
  if (error) {
    console.error("Failed to search:", error)
  } else {
    console.log("Applications:", data.data)
  }
}))