PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Assuming you want a few paragraphs on what you can do with the PostgreSQL API:
The following examples demonstrate some of the things that can be done with the
PostgreSQL API:
import pg from 'pg';
export default defineComponent({
props: {
postgresql: {
type: "app",
app: "postgresql",
}
},
async run({steps, $}) {
const { host, user, password, port, database, ca, cert, key } = this.postgresql.$auth;
const sslConfig = ca && cert && key ? {
ssl: {
rejectUnauthorized: true,
ca,
cert,
key,
},
} : {};
const clientConfig = {
host,
database,
user,
password,
port,
...sslConfig,
};
const client = new pg.Client(clientConfig);
await client.connect();
const results = (await client.query("SELECT NOW()")).rows;
await client.end();
return results;
},
});
The Pipedream Discord app enables you to build event-driven workflows that interact with the Discord API. When you authorize the Pipedream app's access to your guilds, you can use Pipedream workflows to perform common Discord actions, or write your own code against the Discord API.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
discord: {
type: "app",
app: "discord",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://discord.com/api/users/@me`,
headers: {
Authorization: `Bearer ${this.discord.$auth.oauth_access_token}`,
"accept": `application/json`,
},
})
},
})