with Claris Filemaker Server OData API and File Store?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
claris_filemaker_server_odata_api: {
type: "app",
app: "claris_filemaker_server_odata_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.claris_filemaker_server_odata_api.$auth.api_url}/fmi/odata/v4/${this.claris_filemaker_server_odata_api.$auth.database_name}/$metadata`,
auth: {
username: `${this.claris_filemaker_server_odata_api.$auth.username}`,
password: `${this.claris_filemaker_server_odata_api.$auth.password}`,
},
})
},
})
export default defineComponent({
async run({ steps, $ }) {
// list all contents of the root File Stores directory in this project
const dirs = $.files.dir();
let files = [];
for await(const dir of dirs) {
// if this is a file, let's open it
if(dir.isFile()) {
files.push(await $.files.open(dir.path))
}
}
return files
},
})