Pine now supports custom developer integrations, allowing users to create scripts and tools that interact with Pine’s API.
My long-term goals with Pine were always to create a strong core application experience and experiment with more wacky behaviour via experimental extensions and integrations. So, this means that Pine’s current developer support will need to extend beyond “just” making data available on the server side—it will also need to allow users to manipulate the UI and text editor directly. It’s much easier doing this sooner rather than later (it’s also technically satisfying, so there’s a bit of self-indulgence here, too).
Part I of this support focuses on nailing the core API experience, which can be broken down into two steps:
Create an integration that workspaces can install.
Install an integration that has been previously created.
Both steps can be achieved in Pine’s application settings.
Once an integration has been created and installed in your workspace, you can use Pine’s NPM library (@pinecards/client) to query and mutate the data:
npm install @pinecards/client
import { PineClient } from "@pinecards/client";
// initialize client
const client = new PineClient({ accessToken: "YOUR_TOKEN" });
// query data
client.cards.list.query({ limit: 100 });
For those interested, I’ve created a dedicated documentation site that covers the creation of integration and limitations on API requests.
Until next time!