import { Client, Databases } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
/**
* @param queries Array of query strings. Learn more about queries here:
* https://appwrite.io/docs/queries
*/
type Appwrite = {
endpoint: string;
project: string;
key: string;
self_signed: boolean;
};
export async function main(
auth: Appwrite,
database_id: string,
collection_id: string,
queries?: string[],
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key);
const db = new Databases(client);
return await db.listDocuments(database_id, collection_id, queries);
}
Submitted by admin 466 days ago
import { Client, Databases } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
/**
* @param queries Array of query strings. Learn more about queries here:
* https://appwrite.io/docs/queries
*/
type Appwrite = {
endpoint: string;
project: string;
key: string;
self_signed: boolean;
};
export async function main(
auth: Appwrite,
database_id: string,
collection_id: string,
queries?: string[]
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key)
const db = new Databases(client);
return await db.listDocuments(database_id, collection_id, queries)
}
Submitted by admin 469 days ago
import { Resource } from "https://deno.land/x/windmill@v1.87.0/mod.ts"
import { Client, Databases } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
/**
* @param queries Array of query strings. Learn more about queries here:
* https://appwrite.io/docs/queries
*/
export async function main(
auth: Resource<'appwrite'>,
database_id: string,
collection_id: string,
queries?: string[]
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key)
const db = new Databases(client);
return await db.listDocuments(database_id, collection_id, queries)
}
Submitted by adam186 584 days ago