Skip to content
/ dena Public

A promise based Deta http api wrapper for deno.

Notifications You must be signed in to change notification settings

4ov/dena

Repository files navigation

Dena

A library for intracting with deta API from deno

Getting started

import Dena from  'https://deno.land/x/[email protected]/mod.ts'

  

const  dena  =  new  Dena("API_KEY", "PROJECT_ID")

  

const  users  = dena.Base("users")

const  photos  = dena.Drive("photos")

  

await users.insert({

key : "KEY", // optional

username : "mustafa"

})

  

photos.put("me.png", {

data : new  Uint8Array([0]), //Uint8Array

//OR

path : "./path-to-me.png"

})

Supported methods

Base

  • put Base.put
  • get Base.get
  • delete Base.delete
  • insert Base.insert
  • update Base.update
  • query Base.query

Drive

  • put Drive.put
  • Initialize Chunked Upload
  • Upload Chunked Part
  • End Chunked Upload
  • Abort Chunked Upload
  • Download File Drive.get
  • List Files Drive.list
  • Delete Files Drive.delete