notes/Projects/Silverbullet API.md
2023-08-06 21:42:41 +02:00

772 B

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

{
  meta: {
    type: "frontmatter"
  }
  title: {
    type: "heading",
    depth: 1
  },
  description: {

  },
  ingredients: {
    type: "list"
    type: "paragraph",
  }
}

TMDB API

552674 https://image.tmdb.org/t/p/original/zl9uqCl5iUSb50sTk2BPzw6bJnU.jpg


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");