notes/Projects/Silverbullet API.md

52 lines
772 B
Markdown
Raw Permalink Normal View History

# Silverbullet API
Should be a thing running beside silverbullet and providing a API a user can interact with that allows them to define a schema for a specific path and then turn that into an api with the docs.
_Recipe Schema_
```js
{
meta: {
type: "frontmatter"
}
title: {
type: "heading",
depth: 1
},
description: {
},
ingredients: {
type: "list"
type: "paragraph",
}
}
2023-08-06 21:42:41 +02:00
```
## TMDB API
552674
https://image.tmdb.org/t/p/original/zl9uqCl5iUSb50sTk2BPzw6bJnU.jpg
```ts
type Doc = {
}
const {create,read,update,delete} = createCrud<Doc>({
convertIdToPath(id:string){
ctx.getDocument(`Media/movies/`)
},
parse(doc:string,ctx){
},
update(id:string, ctx){
}
})
const doc = await read("Suspiria");
```